mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-14 17:23:57 +00:00
Applies a modified version of upstreams patch to fix the tests, only
upstream only recognized the issue from 3.12, while it hit us on 3.11.4.
(cherry picked from commit d8019d3d27)
17 lines
753 B
Diff
17 lines
753 B
Diff
diff --git a/testsuite/test_api.py b/testsuite/test_api.py
|
|
index 8dde32ff..38e34acf 100644
|
|
--- a/testsuite/test_api.py
|
|
+++ b/testsuite/test_api.py
|
|
@@ -329,7 +329,10 @@ def test_check_nullbytes(self):
|
|
count_errors = pep8style.input_file('stdin', lines=['\x00\n'])
|
|
|
|
stdout = sys.stdout.getvalue()
|
|
- expected = "stdin:1:1: E901 ValueError"
|
|
+ if sys.version_info < (3, 11, 4):
|
|
+ expected = "stdin:1:1: E901 ValueError"
|
|
+ else:
|
|
+ expected = "stdin:1:1: E901 SyntaxError: source code string cannot contain null bytes" # noqa: E501
|
|
self.assertTrue(stdout.startswith(expected),
|
|
msg='Output %r does not start with %r' %
|
|
(stdout, expected))
|