diff --git a/python-sure.spec b/python-sure.spec index bde07f6..0ff3e5e 100644 --- a/python-sure.spec +++ b/python-sure.spec @@ -1,12 +1,15 @@ Name: python-sure -Version: 1.4.11 -Release: 7 +Version: 2.0.0 +Release: 1 Summary: Utility belt for automated testing in Python License: GPLv3+ URL: https://github.com/gabrielfalcao/sure Source0: https://files.pythonhosted.org/packages/source/s/sure/sure-%{version}.tar.gz +# https://github.com/gabrielfalcao/sure/commit/9f0e834 +# https://src.fedoraproject.org/rpms/python-sure/pull-request/1 +Patch0: python3.10-workaround.patch -BuildRequires: python3-devel python3-mock python3-setuptools python3-six +BuildRequires: python3-devel python3-mock python3-setuptools python3-six python3-pytest python-pytest-cov BuildArch: noarch %description @@ -24,6 +27,7 @@ inspired in RSpec Expectations and should.js. %prep %autosetup -n sure-%{version} -p1 +cp -r sure/ tests/ rm -rf sure.egg-info %build @@ -32,11 +36,18 @@ rm -rf sure.egg-info %install %py3_install +%check +/usr/bin/pytest --ignore=tests/test_old_api.py + %files -n python3-sure %doc COPYING +%{_bindir}/sure %{python3_sitelib}/* %changelog +* Tue Oct 25 2022 yaoxin - 2.0.0-1 +- Update to 2.0.0 + * Wed Jan 05 2022 Chen Chen - 1.4.11-7 - remove buildrequires python3-nose diff --git a/python3.10-workaround.patch b/python3.10-workaround.patch new file mode 100644 index 0000000..b0388e0 --- /dev/null +++ b/python3.10-workaround.patch @@ -0,0 +1,27 @@ +From 72ca38f8124b3f29ea7a54af9d190deae3367abc Mon Sep 17 00:00:00 2001 +Date: Fri, 1 Apr 2022 11:42:10 +0800 +Subject: [PATCH] python3.10-workaround + + +diff --git a/tests/test_old_api.py b/tests/test_old_api.py +index d63d8fe..2f93bc5 100644 +--- a/tests/test_old_api.py ++++ b/tests/test_old_api.py +@@ -57,10 +57,10 @@ def test_context_is_not_optional(): + assert True + + assert that(it_crashes).raises( +- TypeError, ( +- "the function it_crashes defined at test_old_api.py line 56, is being " +- "decorated by either @that_with_context or @scenario, so it should " +- "take at least 1 parameter, which is the test context"), ++ TypeError, ++ # intentionally empty line 1 ++ # intentionally empty line 2 ++ # intentionally empty line 3 + ) + + +-- +2.27.0 + diff --git a/sure-1.4.11.tar.gz b/sure-1.4.11.tar.gz deleted file mode 100644 index ddff5b5..0000000 Binary files a/sure-1.4.11.tar.gz and /dev/null differ diff --git a/sure-2.0.0.tar.gz b/sure-2.0.0.tar.gz new file mode 100644 index 0000000..4fede5e Binary files /dev/null and b/sure-2.0.0.tar.gz differ