diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-06-13 10:39:22 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-06-13 10:39:22 +0100 |
commit | 9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch) | |
tree | 8ac67e26b45f34d71c5aab3621813b100a0d5f00 /dev-python/testtools | |
parent | f516638b7fe9592837389826a6152a7e1b251c54 (diff) |
gentoo resync : 13.06.2020
Diffstat (limited to 'dev-python/testtools')
-rw-r--r-- | dev-python/testtools/Manifest | 5 | ||||
-rw-r--r-- | dev-python/testtools/files/testtools-2.4.0-py39.patch | 76 | ||||
-rw-r--r-- | dev-python/testtools/testtools-2.3.0.ebuild | 2 | ||||
-rw-r--r-- | dev-python/testtools/testtools-2.4.0.ebuild | 45 |
4 files changed, 126 insertions, 2 deletions
diff --git a/dev-python/testtools/Manifest b/dev-python/testtools/Manifest index 74c687c45bfc..570c291b4a72 100644 --- a/dev-python/testtools/Manifest +++ b/dev-python/testtools/Manifest @@ -1,4 +1,7 @@ AUX testtools-2.3.0-py37.patch 1740 BLAKE2B 10a1e774fcc436b1e4f33075f807ab70ec79a7d16338cac35f63dbeaf4ab4f95d5f67c69886918405edb7ef939b9cbae00176202705d08a9f1ea80f08c3c6af1 SHA512 e8a441464b8d6e2a75f95b26e83c2b2fefad262fa193bf088b65c1101fb34a9d53ee7a3554cf005519a44cc007f78df74d32163e5910f447318c2e89e67529d3 +AUX testtools-2.4.0-py39.patch 4816 BLAKE2B dc5198c0c8baab37ae645d97cb93c860e737142b691d00f96e35574dd0e77f8a163d4031a4b96aa9f28664af1a3a58552565bf5d887cef00c72e13ba9c3b3ea9 SHA512 a554d49e74f43269a847d767611f86fda655fe9ca27cf182c91975702b6928b4161e12d78283113b88b4d50b9fce240cd4fbf236e884e8b92698bdd512c42598 DIST testtools-2.3.0.tar.gz 231559 BLAKE2B 6ae098e368cabc0bfe45736324819687a6086eccf868de7eec312caf7c64b5d75a3168f3966d5cd0b05ad9295957a7aa1ee3c1589f076de1f5cb619b197ba08a SHA512 558fe6a1bdce7215f9f6f178f469a2b76948dc7ff0ce27400482a16683474edb81d9bf90ae48b6fcb8df9eb70759341b694aa162ed3d9d4abd372981cdcd8a64 -EBUILD testtools-2.3.0.ebuild 1518 BLAKE2B 22088b93e187496b5864c04f453d947e92a6a573bc2e004e9358de048bc23fd811909ee642696e16719bd2b8537368cdab53bd0bab6d69796d9d3af0520ea8d7 SHA512 11bb521cadbfbfc4ab8d96a093366d4b51471b34f662271a6e8e0b95adde303d5b905671d4a0cecfdf32db291d18acca4ce2c0f93d620c9484bd8064349cecb2 +DIST testtools-2.4.0.tar.gz 233032 BLAKE2B 8b0559039bfc5e18dfe8d70cc10f6e43ad2e1fbebf7d20d9c6c876c5672a6149064f558150d8eb09f569b82983ffe67e06143b14a1d8869efcc585839d6216ae SHA512 af26e163a4caeb207a554b19f86c7892ab5ebe904c144d85273464e880cd18a991c70a77ff817aefb15768fa38f382e9ed853cdefb212dc697b24072e17535c0 +EBUILD testtools-2.3.0.ebuild 1525 BLAKE2B 3019cb2605fa41e8031a9214b39014114f10fabc7ef52299f3ab0a2a3d07279bed44d345a7ad0d90bc084775b6fb259b6d01292eae989adfd1d7b279355510c7 SHA512 dceeb6352bb3a62a2c14dabfbbc9521e56914bb4e41115a05f7dc2717b86c49dc33eb2001c6e6b5ddc0a1b3da90da571081629e821ca857874bc5db1de32b53a +EBUILD testtools-2.4.0.ebuild 1257 BLAKE2B 5f8afb462a79c58e6cb6fefba2833f8147f2b2035118c57250df0ab3f7bc3a0f61538718ea63544335c61fe6454542f5b7492ee7abc2c23f3c94186fec37f516 SHA512 18e04ca6c6333410c103c80d5ef9e780cfe35d3cb2df02ef771d1e4ec5163ed2bfd2cadd9a5dddd862de83464ede20e67a04521b4e9dae065f65b8d19e0dc9f2 MISC metadata.xml 554 BLAKE2B 251f32aa81267f470d8f5d1f22bd2e2354fc39ec79ac326dd64333e73e5cc8ab35d6633e1ebce2bad5086d55f838fb129d7cbde2e1d36cf77945527e6e786157 SHA512 ebe5defc73dc62044732463b2d295c08ca24573c34b689150f3865247b34ef6d925437a0c97598c3260ec037c4ed3644017601fd2b7127521c7c352edc1e6384 diff --git a/dev-python/testtools/files/testtools-2.4.0-py39.patch b/dev-python/testtools/files/testtools-2.4.0-py39.patch new file mode 100644 index 000000000000..a502e1cc0630 --- /dev/null +++ b/dev-python/testtools/files/testtools-2.4.0-py39.patch @@ -0,0 +1,76 @@ +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( diff --git a/dev-python/testtools/testtools-2.3.0.ebuild b/dev-python/testtools/testtools-2.3.0.ebuild index 0ca5634cedcf..d7d7f476c5bc 100644 --- a/dev-python/testtools/testtools-2.3.0.ebuild +++ b/dev-python/testtools/testtools-2.3.0.ebuild @@ -20,7 +20,7 @@ RESTRICT="!test? ( test )" CDEPEND=" >=dev-python/extras-1.0.0[${PYTHON_USEDEP}] - dev-python/mimeparse[${PYTHON_USEDEP}] + dev-python/python-mimeparse[${PYTHON_USEDEP}] >=dev-python/pbr-0.11[${PYTHON_USEDEP}] dev-python/pyrsistent[${PYTHON_USEDEP}] >=dev-python/six-1.4.0[${PYTHON_USEDEP}] diff --git a/dev-python/testtools/testtools-2.4.0.ebuild b/dev-python/testtools/testtools-2.4.0.ebuild new file mode 100644 index 000000000000..41097304bed4 --- /dev/null +++ b/dev-python/testtools/testtools-2.4.0.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{6..9} pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 + +DESCRIPTION="Extensions to the Python standard library unit testing framework" +HOMEPAGE="https://github.com/testing-cabal/testtools" +SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +RDEPEND=" + >=dev-python/extras-1.0.0[${PYTHON_USEDEP}] + dev-python/python-mimeparse[${PYTHON_USEDEP}] + >=dev-python/pbr-0.11[${PYTHON_USEDEP}] + dev-python/pyrsistent[${PYTHON_USEDEP}] + >=dev-python/six-1.4.0[${PYTHON_USEDEP}] + dev-python/traceback2[${PYTHON_USEDEP}] + >=dev-python/unittest2-1.0.0[${PYTHON_USEDEP}] +" +DEPEND=" + test? ( + >=dev-python/fixtures-1.3.0[${PYTHON_USEDEP}] + dev-python/testscenarios[${PYTHON_USEDEP}] + ) +" +PDEPEND=">=dev-python/fixtures-1.3.0[${PYTHON_USEDEP}]" + +PATCHES=( + "${FILESDIR}"/testtools-2.4.0-py39.patch +) + +distutils_enable_sphinx doc +distutils_enable_tests unittest + +python_test() { + "${PYTHON}" -m testtools.run testtools.tests.test_suite || die "tests failed under ${EPYTHON}" +} |