diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-07 00:16:33 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-07 00:16:33 +0100 |
commit | d162ba1860a88062f4cd61f8b52fc303ba0b2991 (patch) | |
tree | 24cd2cf57f3932a24b96e4a0f6666489447e43ba /dev-python/regex/files/regex-2021.4.4-pypy3-fix-test_issue_18468.patch | |
parent | 590b9b7b03bf4651e099949e318755af7cfa81b8 (diff) |
gentoo resync : 07.08.2021
Diffstat (limited to 'dev-python/regex/files/regex-2021.4.4-pypy3-fix-test_issue_18468.patch')
-rw-r--r-- | dev-python/regex/files/regex-2021.4.4-pypy3-fix-test_issue_18468.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dev-python/regex/files/regex-2021.4.4-pypy3-fix-test_issue_18468.patch b/dev-python/regex/files/regex-2021.4.4-pypy3-fix-test_issue_18468.patch new file mode 100644 index 000000000000..ae5958021781 --- /dev/null +++ b/dev-python/regex/files/regex-2021.4.4-pypy3-fix-test_issue_18468.patch @@ -0,0 +1,31 @@ +From: Arthur Zamarin <arthurzam@gmail.com> +Date: Fri, 30 Jul 2021 11:38:26 +0300 +[PATCH] PyPy3: fix test_issue_18468 + +When using the small subclass classes to test correctness of split +results, there are difference between CPython and PyPy3: + - CPython returns always the base class (for example str instead + of StrSubclass) + - PyPy3 returns the same class, so we get an StrSubclass + +Based on the test, it looks like the behaviour of PyPy3 is correct, +but the test works based on CPython. + +The fix was to relax the equals type to check that it is a subclass. + +Signed-off-by: Arthur Zamarin <arthurzam@gmail.com> +--- + regex_3/test_regex.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/regex_3/test_regex.py ++++ b/regex_3/test_regex.py +@@ -52,7 +52,7 @@ class RegexTests(unittest.TestCase): + for x, y in zip(actual, expect): + recurse(x, y) + else: +- self.assertIs(type(actual), type(expect), msg) ++ self.assertIsInstance(actual, type(expect), msg) + + recurse(actual, expect) + |