forked from pool/python-testresources
Accepting request 1277944 from home:glaubitz:branches:devel:languages:python
- Update to 2.0.2 * Skip testBasicSortTests in general (Kelledin) * Add a TestResourceManager.id() API for letting test results report about a resource identity (freeekanayaka) * Refactor failIf to assertFalse for Python 3.12 Compatibility (cjwatson) * Add support for Python >=3.10 (jelmer) - Drop use-correct-assertions.patch, merged upstream - Refresh testresources-flaky-tests.patch OBS-URL: https://build.opensuse.org/request/show/1277944 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-testresources?expand=0&rev=29
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.osc
|
111
python-testresources.changes
Normal file
111
python-testresources.changes
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 16 06:21:57 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
- Update to 2.0.2
|
||||||
|
* Skip testBasicSortTests in general (Kelledin)
|
||||||
|
* Add a TestResourceManager.id() API for letting test results
|
||||||
|
report about a resource identity (freeekanayaka)
|
||||||
|
* Refactor failIf to assertFalse for Python 3.12 Compatibility (cjwatson)
|
||||||
|
* Add support for Python >=3.10 (jelmer)
|
||||||
|
- Drop use-correct-assertions.patch, merged upstream
|
||||||
|
- Refresh testresources-flaky-tests.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 8 06:37:08 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Do not use pytest for the testsuite, switch to %pyunittest.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 16 02:47:15 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch use-correct-assertions.patch:
|
||||||
|
* Use current and correct method names.
|
||||||
|
- Switch to pyproject macros.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 21 12:37:18 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add sle15_python_module_pythons (jsc#PED-68)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 18 12:39:35 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Switch to single spec version build for PSP
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 13 13:12:54 UTC 2021 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- use %pytest macro
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 14 14:45:15 UTC 2019 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Replace %fdupes -s with plain %fdupes; hardlinks are better.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 8 12:29:15 UTC 2018 - jengelh@inai.de
|
||||||
|
|
||||||
|
- Trim repeated name from summary (rpmlint).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 7 10:33:15 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Add patch testresources-flaky-tests.patch to disable flaky test
|
||||||
|
- Drop PR-8.patch as it is obsolete by the above patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 7 10:17:11 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Cleanup with spec-cleaner
|
||||||
|
- Simplify the tests execution
|
||||||
|
- Install license files
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 21 09:04:38 UTC 2017 - tbechtold@suse.com
|
||||||
|
|
||||||
|
- Add PR-8.patch . This skips a flaky test during python3 test runs
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Apr 9 13:28:52 UTC 2017 - aloisio@gmx.com
|
||||||
|
|
||||||
|
- Converted to single-spec
|
||||||
|
- Fixed source URL
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 14 14:13:03 UTC 2016 - dmueller@suse.com
|
||||||
|
|
||||||
|
- update to 2.0.1:
|
||||||
|
* Fix #1590536 classifiers not reported in PyPI
|
||||||
|
* Drop support for Python 2.4, 2.5, 3.2
|
||||||
|
* Bug #1524048: depend on pbr at runtime
|
||||||
|
* Handle unittest2 test suites as well
|
||||||
|
* Use pbr for versions as well
|
||||||
|
* More diagnostics on sort failures
|
||||||
|
* Cleanup old helper we don't need anymore
|
||||||
|
* Add a tox.ini for convenience
|
||||||
|
* Add a Travis config
|
||||||
|
* Ignore more files
|
||||||
|
* Build and ship wheels
|
||||||
|
* Migrate to pbr
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 12 08:42:01 UTC 2014 - cdenicolo@suse.com
|
||||||
|
|
||||||
|
- license update: (Apache-2.0 or BSD-3-Clause) and GPL-2.0+
|
||||||
|
missing BSD-license
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 24 11:15:49 UTC 2013 - speilicke@suse.com
|
||||||
|
|
||||||
|
- Require python-setuptools instead of distribute (upstreams merged)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 3 09:15:08 UTC 2013 - speilicke@suse.com
|
||||||
|
|
||||||
|
- Fix license according to what sr#159597 intended
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 15 14:29:27 UTC 2013 - speilicke@suse.com
|
||||||
|
|
||||||
|
- Initial version
|
||||||
|
|
63
python-testresources.spec
Normal file
63
python-testresources.spec
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-testresources
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
|
Name: python-testresources
|
||||||
|
Version: 2.0.2
|
||||||
|
Release: 0
|
||||||
|
Summary: A pyunit extension for managing expensive test resources
|
||||||
|
License: (Apache-2.0 OR BSD-3-Clause) AND GPL-2.0-or-later
|
||||||
|
URL: https://github.com/testing-cabal/testresources
|
||||||
|
Source: https://files.pythonhosted.org/packages/source/t/testresources/testresources-%{version}.tar.gz
|
||||||
|
Patch0: testresources-flaky-tests.patch
|
||||||
|
BuildRequires: %{python_module fixtures}
|
||||||
|
BuildRequires: %{python_module pbr}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module testtools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: python-pbr
|
||||||
|
BuildArch: noarch
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
testresources: extensions to python unittest to allow declarative use
|
||||||
|
of resources by test cases.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n testresources-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
%pyproject_wheel
|
||||||
|
|
||||||
|
%install
|
||||||
|
%pyproject_install
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%pyunittest
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%license BSD Apache-2.0 COPYING
|
||||||
|
%doc README.rst
|
||||||
|
%{python_sitelib}/testresources
|
||||||
|
%{python_sitelib}/testresources-%{version}.dist-info
|
||||||
|
|
||||||
|
%changelog
|
BIN
testresources-2.0.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
testresources-2.0.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
testresources-2.0.2.tar.gz
(Stored with Git LFS)
Normal file
BIN
testresources-2.0.2.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
11
testresources-flaky-tests.patch
Normal file
11
testresources-flaky-tests.patch
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
diff -Nru testresources-2.0.2.orig/testresources/tests/test_optimising_test_suite.py testresources-2.0.2/testresources/tests/test_optimising_test_suite.py
|
||||||
|
--- testresources-2.0.2.orig/testresources/tests/test_optimising_test_suite.py 2025-04-22 12:21:27.000000000 +0200
|
||||||
|
+++ testresources-2.0.2/testresources/tests/test_optimising_test_suite.py 2025-05-16 08:21:08.834763803 +0200
|
||||||
|
@@ -537,6 +537,7 @@
|
||||||
|
permutations.append([case4, case1, case3, case2])
|
||||||
|
return permutations
|
||||||
|
|
||||||
|
+ @unittest.skip("too flaky")
|
||||||
|
def testBasicSortTests(self):
|
||||||
|
self.skipTest("flaky, see LP #1645008")
|
||||||
|
# Test every permutation of inputs, with legacy tests.
|
41
use-correct-assertions.patch
Normal file
41
use-correct-assertions.patch
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
From 7bb62a13fa1d28717c10f3152b5e8ea479c8e9d2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
|
||||||
|
Date: Wed, 31 May 2023 08:40:30 +0200
|
||||||
|
Subject: [PATCH] Refactor failIf to assertFalse for Python 3.12 Compatibility
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
This commit replaces deprecated failIf calls with assertFalse in the
|
||||||
|
test_resourced_test_case.py file. The failIf method was removed in
|
||||||
|
Python 3.12 [1-3].
|
||||||
|
|
||||||
|
[1] https://docs.python.org/3.12/whatsnew/3.12.html#removed
|
||||||
|
[2] https://github.com/python/cpython/issues/89325
|
||||||
|
[3] https://github.com/python/cpython/pull/28268
|
||||||
|
|
||||||
|
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
|
||||||
|
---
|
||||||
|
testresources/tests/test_resourced_test_case.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/testresources/tests/test_resourced_test_case.py b/testresources/tests/test_resourced_test_case.py
|
||||||
|
index 7d2cfba..3c8a1b3 100644
|
||||||
|
--- a/testresources/tests/test_resourced_test_case.py
|
||||||
|
+++ b/testresources/tests/test_resourced_test_case.py
|
||||||
|
@@ -129,7 +129,7 @@ def testTearDownResourcesDeletesResourceAttributes(self):
|
||||||
|
self.resourced_case.resources = [("foo", self.resource_manager)]
|
||||||
|
self.resourced_case.setUpResources()
|
||||||
|
self.resourced_case.tearDownResources()
|
||||||
|
- self.failIf(hasattr(self.resourced_case, "foo"))
|
||||||
|
+ self.assertFalse(hasattr(self.resourced_case, "foo"))
|
||||||
|
|
||||||
|
def testTearDownResourcesStopsUsingResource(self):
|
||||||
|
# tearDownResources records that there is one less use of each
|
||||||
|
@@ -158,5 +158,5 @@ def testSingleWithSetup(self):
|
||||||
|
self.assertEqual(self.resourced_case.foo, self.resource)
|
||||||
|
self.assertEqual(self.resource_manager._uses, 1)
|
||||||
|
self.resourced_case.tearDown()
|
||||||
|
- self.failIf(hasattr(self.resourced_case, "foo"))
|
||||||
|
+ self.assertFalse(hasattr(self.resourced_case, "foo"))
|
||||||
|
self.assertEqual(self.resource_manager._uses, 0)
|
Reference in New Issue
Block a user