diff options
author | Frederick Muriuki Muriithi | 2025-10-06 09:54:09 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-10-06 11:30:12 -0500 |
commit | a3926a5c29f1a6360e2ad0fd5bf0d6f009090406 (patch) | |
tree | 6650d9989306684ef001d2c2a868eaafd6708e9e /gn/packages/patches/python-unittest2-python3-compat.patch | |
parent | d9a10dd3e6f370f068e9c7a96318546d550a3731 (diff) | |
download | guix-bioinformatics-a3926a5c29f1a6360e2ad0fd5bf0d6f009090406.tar.gz |
python-unittest2: Copy deleted package over from guix mainline
Certain packages in guix-bioinformatics have `python-unittest2` as a dependency, but the package was deleted from guix mainline. This commit copies the deleted package definition over to guix-bioinformatics and includes the module where the package is used.
Diffstat (limited to 'gn/packages/patches/python-unittest2-python3-compat.patch')
-rw-r--r-- | gn/packages/patches/python-unittest2-python3-compat.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/gn/packages/patches/python-unittest2-python3-compat.patch b/gn/packages/patches/python-unittest2-python3-compat.patch new file mode 100644 index 0000000..68fbcca --- /dev/null +++ b/gn/packages/patches/python-unittest2-python3-compat.patch @@ -0,0 +1,46 @@ +Skip tests that fail with newer versions of Python. + +Patch copied from Gentoo: + +https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-python/unittest2/files/unittest2-1.1.0-python3.5-test.patch + +diff --git a/unittest2/test/test_loader.py b/unittest2/test/test_loader.py +index 683f662..347eea5 100644 +--- a/unittest2/test/test_loader.py ++++ b/unittest2/test/test_loader.py +@@ -509,6 +509,7 @@ class Test_TestLoader(unittest2.TestCase): + # + # What happens when an impossible name is given, relative to the provided + # `module`? ++ @unittest.skipIf(sys.version_info[:2] >= (3, 5), "python 3.5 has problems here") + def test_loadTestsFromName__relative_malformed_name(self): + loader = unittest.TestLoader() + +@@ -811,6 +812,7 @@ class Test_TestLoader(unittest2.TestCase): + # TestCase or TestSuite instance." + # + # What happens when presented with an impossible module name? ++ @unittest.skipIf(sys.version_info[:2] >= (3, 5), "python 3.5 has problems here") + def test_loadTestsFromNames__malformed_name(self): + loader = unittest2.TestLoader() + +@@ -918,6 +920,7 @@ class Test_TestLoader(unittest2.TestCase): + # "The method optionally resolves name relative to the given module" + # + # What happens when presented with an impossible attribute name? ++ @unittest.skipIf(sys.version_info[:2] >= (3, 5), "python 3.5 has problems here") + def test_loadTestsFromNames__relative_malformed_name(self): + loader = unittest.TestLoader() + +diff --git a/unittest2/compatibility.py b/unittest2/compatibility.py +index 9e5f1a5..2d20c19 100644 +--- a/unittest2/compatibility.py ++++ b/unittest2/compatibility.py +@@ -140,6 +140,6 @@ except ImportError: + ### ChainMap (helper for configparser and string.Template) + ######################################################################## + +-class ChainMap(collections.MutableMapping): ++class ChainMap(collections.abc.MutableMapping): + ''' A ChainMap groups multiple dicts (or other mappings) together + to create a single, updateable view. |