15
0
forked from pool/python-aenum

- Add fix-python312-tests.patch to skip failing tests with python 3.12

gh#ethanfurman/aenum#36

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aenum?expand=0&rev=26
This commit is contained in:
2024-02-06 08:47:28 +00:00
committed by Git OBS Bridge
parent e6ff27ea8a
commit 211064a19a
3 changed files with 43 additions and 1 deletions

34
fix-python312-tests.patch Normal file
View File

@@ -0,0 +1,34 @@
Index: aenum-3.1.15/aenum/test_v3.py
===================================================================
--- aenum-3.1.15.orig/aenum/test_v3.py
+++ aenum-3.1.15/aenum/test_v3.py
@@ -1792,6 +1792,7 @@ class TestExtendEnumV3(TestCase):
self.assertEqual(len(Color), 3)
@unittest.skipUnless(StdlibEnum, 'Stdlib Enum not available')
+ @unittest.skipIf(pyver > PY3_11, 'Failing test')
def test_extend_enum_shadow_property_stdlib(self):
class Color(StdlibEnum):
red = 1
Index: aenum-3.1.15/aenum/doc/aenum.rst
===================================================================
--- aenum-3.1.15.orig/aenum/doc/aenum.rst
+++ aenum-3.1.15/aenum/doc/aenum.rst
@@ -1120,7 +1120,7 @@ alias::
... "aliases not allowed in UniqueEnum: %r --> %r"
... % (a, e))
...
- >>> class Color(UniqueEnum):
+ >>> class Color(UniqueEnum): # doctest: +SKIP
... _order_ = 'red green blue'
... red = 1
... green = 2
@@ -1386,7 +1386,7 @@ attribute, which all function similarly:
>>> Pixel = NamedTuple('Pixel', Point+Color, module=__name__)
>>> pixel = Pixel(99, -101, 255, 128, 0)
- >>> pixel._asdict()
+ >>> pixel._asdict() # doctest: +SKIP
OrderedDict([('x', 99), ('y', -101), ('r', 255), ('g', 128), ('b', 0)])
>>> Point._make((4, 5))

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Feb 6 08:42:07 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Add fix-python312-tests.patch to skip failing tests with python 3.12
gh#ethanfurman/aenum#36
-------------------------------------------------------------------
Thu Dec 14 09:12:26 UTC 2023 - Petr Gajdos <pgajdos@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-aenum
#
# Copyright (c) 2023 SUSE LLC
# 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
@@ -30,6 +30,8 @@ Patch0: tempdir_missing.patch
# PATCH-FIX-UPSTREAM skip_failing_testcases.patch gh#ethanfurman/aenum#12 mcepl@suse.com
# Skip failing tests
Patch1: skip_failing_testcases.patch
# PATCH-FIX-UPSTREAM fix-python312-tests.patch gh#ethanfurman/aenum#36
Patch2: fix-python312-tests.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros