aboutsummaryrefslogtreecommitdiff
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.
begin with an S-expression and jump straight to the offset closest to the desired line number to read the S-expression there. * etc/committer.scm.in (lines+offsets-with-opening-parens): New procedure. (surrounding-sexp): Use it. Ricardo Wurmus 2023-09-24etc/committer: Avoid reading original files more than once....* etc/committer.scm.in (%original-file-cache): New variable. (read-original-file): New procedure. (read-original-file*): New procedure. (old-sexp): Use it. Ricardo Wurmus 2023-09-24etc/committer: Do not record positions when reading from git files....This gives us a slight performance boost. * etc/committer.scm.in (main): Disable recording of positions. Ricardo Wurmus 2023-09-24etc/committer: Do not recompute changes when there are no definitions....* etc/committer.scm.in (main): Reuse previously computed changes if there are no changes to the number of definitions. Ricardo Wurmus 2022-05-31etc/committer: Teach it how to commit package removal....* etc/committer.scm.in (hunk-types): New variable. (<hunk>): Rename hunk-definition? getter to 'hunk-type'. (diff-info): Mute a git warning by separating file names from arguments with '--'. Rename the 'definitions?' variable to 'type'. Use the 'addition type when a new package addition is detected, 'removal when removed else #f. (add-commit-message): Re-indent. (remove-commit-message): New procedure. (main)[definitions]: Make commit message conditional depending on whether it is an addition or removal. [changes]: Adjust indentation. Maxim Cournoyer 2022-05-31etc/committer: Prefix (sxml xpath) symbols to avoid name conflict....This avoids a naming conflict for 'filter', provided by both (srfi srfi-1) and (sxml xpath). * etc/committer.scm.in: Use 'use-modules' instead of 'import', and use a prefix for the (sxml xpath) module. (new-sexp): Adjust accordingly. (change-commit-message): Likewise. Maxim Cournoyer 2022-01-23etc: committer: Support plain input lists....* etc/committer.scm.in (change-commit-message): Support new-style plain list inputs in addition to old-style inputs with labels. Ricardo Wurmus