summaryrefslogtreecommitdiff
path: root/dev-python/testtools/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-08-17 11:36:49 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-08-17 11:36:49 +0100
commite2db47eaae00ec33f8971db44b68645c5d3b9590 (patch)
tree3ec0cf16ddb5854017e134fabebe14bf8cb94a34 /dev-python/testtools/files
parent616579b5d773c50af31ee56f00105d96ce641ca2 (diff)
gentoo resync : 17.08.2021
Diffstat (limited to 'dev-python/testtools/files')
-rw-r--r--dev-python/testtools/files/testtools-2.4.0-assertitemsequal.patch27
-rw-r--r--dev-python/testtools/files/testtools-2.4.0-py310.patch43
-rw-r--r--dev-python/testtools/files/testtools-2.4.0-py39.patch76
3 files changed, 0 insertions, 146 deletions
diff --git a/dev-python/testtools/files/testtools-2.4.0-assertitemsequal.patch b/dev-python/testtools/files/testtools-2.4.0-assertitemsequal.patch
deleted file mode 100644
index e46bf29c8bfc..000000000000
--- a/dev-python/testtools/files/testtools-2.4.0-assertitemsequal.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 2ead7c11a54b0860e02992212e302c4a7bd26c35 Mon Sep 17 00:00:00 2001
-From: Matthew Treinish <mtreinish@kortar.org>
-Date: Wed, 8 Jul 2020 14:22:24 -0400
-Subject: [PATCH] Update testtools/testcase.py
-
-Co-authored-by: Thomas Grainger <tagrain@gmail.com>
----
- testtools/testcase.py | 1 +
- 1 file changed, 1 insertion(+)
-
-Rebased for 2.4.0 by Michał Górny (eliminating intermediate commits).
-
-diff --git a/testtools/testcase.py b/testtools/testcase.py
-index bff5be2..22e9143 100644
---- a/testtools/testcase.py
-+++ b/testtools/testcase.py
-@@ -501,6 +501,7 @@ class TestCase(unittest.TestCase):
- if mismatch_error is not None:
- raise mismatch_error
-
-+ assertItemsEqual = unittest.TestCase.assertCountEqual
- def addDetailUniqueName(self, name, content_object):
- """Add a detail to the test, but ensure it's name is unique.
-
---
-2.32.0
-
diff --git a/dev-python/testtools/files/testtools-2.4.0-py310.patch b/dev-python/testtools/files/testtools-2.4.0-py310.patch
deleted file mode 100644
index d2d0c092d14a..000000000000
--- a/dev-python/testtools/files/testtools-2.4.0-py310.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From d528842b99b16efce212e15dae3f0a54927d06d8 Mon Sep 17 00:00:00 2001
-From: Cyril Roelandt <cyril@redhat.com>
-Date: Fri, 19 Mar 2021 02:50:13 +0000
-Subject: [PATCH] Fix tests with Python 3.10
-
-In Python 3, error messages have become a bit more precise. For
-instance, the following code snippet:
-
-----
-class Foo():
- def bar(self, a):
- pass
-
-try:
- Foo().bar(1, 2)
-except TypeError as e:
- print(e)
-----
-
-will return:
-
-- in Python 3.9: "bar() takes 2 positional arguments but 3 were given"
-- in Python 3.10: "Foo.bar() takes 2 positional arguments but 3 were
- given"
-
-Fix our tests accordingly.
----
- testtools/tests/test_testsuite.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/testtools/tests/test_testsuite.py b/testtools/tests/test_testsuite.py
-index 7ad5b74d..65cb88d7 100644
---- a/testtools/tests/test_testsuite.py
-+++ b/testtools/tests/test_testsuite.py
-@@ -181,7 +181,7 @@ def run(self):
- test.run(process_result)
- """, doctest.ELLIPSIS))
- self.assertThat(events[3][6].decode('utf8'), DocTestMatches("""\
--TypeError: run() takes ...1 ...argument...2...given...
-+TypeError: ...run() takes ...1 ...argument...2...given...
- """, doctest.ELLIPSIS))
- events = [event[0:10] + (None,) for event in events]
- events[1] = events[1][:6] + (None,) + events[1][7:]
diff --git a/dev-python/testtools/files/testtools-2.4.0-py39.patch b/dev-python/testtools/files/testtools-2.4.0-py39.patch
deleted file mode 100644
index a502e1cc0630..000000000000
--- a/dev-python/testtools/files/testtools-2.4.0-py39.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 1d698cf91cb2205aedc018e465a2e17c5a6a3e94 Mon Sep 17 00:00:00 2001
-From: Michel Alexandre Salim <michel@michel-slm.name>
-Date: Sat, 16 May 2020 13:21:38 -0700
-Subject: [PATCH] Fix syntax error test for Python 3.9
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-On Python 3.9 the zero-width no-break space Unicode character U+FEFF
-does not get printed in syntax errors.
-
-See:
-https://bugzilla.redhat.com/show_bug.cgi?id=1831126
-
-This is reproducible in a virtual environment as well.
-
-Before:
-```
-.venv ❯ make check
-PYTHONPATH=/home/michel/src/github/testing-cabal/testtools python -m testtools.run testtools.tests.test_suite
-/usr/lib64/python3.9/runpy.py:127: RuntimeWarning: 'testtools.run' found in sys.modules after import of package 'testtools', but prior to execution of 'testtools.run'; this may result in unpredictable behaviour
- warn(RuntimeWarning(msg))
-Tests running...
-======================================================================
-FAIL: testtools.tests.test_testresult.TestNonAsciiResults.test_syntax_error_line_utf_8
-----------------------------------------------------------------------
-Traceback (most recent call last):
- File "/home/michel/src/github/testing-cabal/testtools/testtools/tests/test_testresult.py", line 2744, in test_syntax_error_line_utf_8
- self.assertThat(
- File "/home/michel/src/github/testing-cabal/testtools/testtools/testcase.py", line 499, in assertThat
- raise mismatch_error
-testtools.matchers._impl.MismatchError: 'Tests running...\n======================================================================\nERROR: test_syntax_error_line_utf_8.Test.runTest\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File "/tmp/TestNonAsciiResultsblblh75h/test_syntax_error_line_utf_8.py", line 6, in runTest\n import bad\n File "/tmp/TestNonAsciiResultsblblh75h/bad.py", line 1\n \ufeff^ = 0 # paɪθən\n ^\nSyntaxError: invalid syntax\n\nRan 1 test in 0.001s\nFAILED (failures=1)\n' does not match /.*bad.py", line 1\n\s*\^ = 0 # pa\u026a\u03b8\u0259n\n \s*\^\nSyntaxError:.*/
-======================================================================
-FAIL: testtools.tests.test_testresult.TestNonAsciiResultsWithUnittest.test_syntax_error_line_utf_8
-----------------------------------------------------------------------
-Traceback (most recent call last):
- File "/home/michel/src/github/testing-cabal/testtools/testtools/tests/test_testresult.py", line 2744, in test_syntax_error_line_utf_8
- self.assertThat(
- File "/home/michel/src/github/testing-cabal/testtools/testtools/testcase.py", line 499, in assertThat
- raise mismatch_error
-testtools.matchers._impl.MismatchError: 'E\n======================================================================\nERROR: runTest (test_syntax_error_line_utf_8.Test)\ntest_syntax_error_line_utf_8.Test.runTest\n----------------------------------------------------------------------\ntesttools.testresult.real._StringException: Traceback (most recent call last):\n File "/tmp/TestNonAsciiResultsWithUnittest_zzswpmj/test_syntax_error_line_utf_8.py", line 6, in runTest\n import bad\n File "/tmp/TestNonAsciiResultsWithUnittest_zzswpmj/bad.py", line 1\n \ufeff^ = 0 # paɪθən\n ^\nSyntaxError: invalid syntax\n\n\n----------------------------------------------------------------------\nRan 1 test in 0.000s\n\nFAILED (errors=1)\n' does not match /.*bad.py", line 1\n\s*\^ = 0 # pa\u026a\u03b8\u0259n\n \s*\^\nSyntaxError:.*/
-
-Ran 2627 tests in 0.569s
-FAILED (failures=2)
-make: *** [Makefile:7: check] Error 1
-```
-
-After:
-```
-.venv ❯ make check
-PYTHONPATH=/home/michel/src/github/testing-cabal/testtools python -m testtools.run testtools.tests.test_suite
-/usr/lib64/python3.9/runpy.py:127: RuntimeWarning: 'testtools.run' found in sys.modules after import of package 'testtools', but prior to execution of 'testtools.run'; this may result in unpredictable behaviour
- warn(RuntimeWarning(msg))
-Tests running...
-
-Ran 2627 tests in 0.492s
-OK
-```
----
- testtools/tests/test_testresult.py | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/testtools/tests/test_testresult.py b/testtools/tests/test_testresult.py
-index 3bbd8937..deceb07d 100644
---- a/testtools/tests/test_testresult.py
-+++ b/testtools/tests/test_testresult.py
-@@ -2741,6 +2741,9 @@ def test_syntax_error_line_utf_8(self):
- textoutput = self._setup_external_case("import bad")
- self._write_module("bad", "utf-8", "\ufeff^ = 0 # %s\n" % text)
- textoutput = self._run_external_case()
-+ # Python 3.9 no longer prints the '\ufeff'
-+ if sys.version_info >= (3,9):
-+ textoutput = textoutput.replace('\ufeff', '')
- self.assertThat(
- textoutput,
- MatchesRegex(