diff options
Diffstat (limited to 'dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch')
-rw-r--r-- | dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch b/dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch new file mode 100644 index 000000000000..9aadf2758c0c --- /dev/null +++ b/dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch @@ -0,0 +1,28 @@ +--- a/test/test_autopep8.py 2022-07-01 16:53:14.197393816 +0300 ++++ b/test/test_autopep8.py 2022-07-01 17:26:07.740358186 +0300 +@@ -5729,7 +5729,11 @@ + list(AUTOPEP8_CMD_TUPLE) + [filename, '--in-place'], + stderr=PIPE, + ) +- _, err = p.communicate() ++ _, error = p.communicate() ++ if b'DeprecationWarning: lib2to3 package is deprecated' in error: ++ err = bytes() ++ else: ++ err = error + self.assertEqual(err, b'') + self.assertEqual(p.returncode, autopep8.EXIT_CODE_OK) + +@@ -5741,7 +5745,11 @@ + list(AUTOPEP8_CMD_TUPLE) + [filename, '--in-place'], + stderr=PIPE, + ) +- _, err = p.communicate() ++ _, error = p.communicate() ++ if b'DeprecationWarning: lib2to3 package is deprecated' in error: ++ err = bytes() ++ else: ++ err = error + self.assertEqual(err, b'') + self.assertEqual(p.returncode, autopep8.EXIT_CODE_OK) + |