From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 8 May 2021 09:09:29 +0000 (-0700) Subject: [3.10] bpo-31904: Correct error string in test_file_not_exists() for VxWorks (GH... X-Git-Tag: v3.10.0b2~129 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6e7fe1901631dc730abc02d1f546a99fd6b6fe83;p=thirdparty%2FPython%2Fcpython.git [3.10] bpo-31904: Correct error string in test_file_not_exists() for VxWorks (GH-25965) (GH-25983) The error string on VxWorks is "no such file or directory" for FileNotFoundError. That is, the 1st letter of the error string has lower case. (cherry picked from commit b063b02eabf91bfd4edc0f3fde7ce8f0ebb392c4) Co-authored-by: pxinwr Automerge-Triggered-By: GH:gpshead --- diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py index b58f28a4bc88..5ed98dbff173 100644 --- a/Lib/test/test_py_compile.py +++ b/Lib/test/test_py_compile.py @@ -276,7 +276,7 @@ class PyCompileCLITestCase(unittest.TestCase): rc, stdout, stderr = self.pycompilecmd_failure(self.source_path, should_not_exists) self.assertEqual(rc, 1) self.assertEqual(stdout, b'') - self.assertIn(b'No such file or directory', stderr) + self.assertIn(b'no such file or directory', stderr.lower()) def test_file_not_exists_with_quiet(self): should_not_exists = os.path.join(os.path.dirname(__file__), 'should_not_exists.py') diff --git a/Misc/NEWS.d/next/Tests/2021-05-07-15-46-04.bpo-31904.8dk3la.rst b/Misc/NEWS.d/next/Tests/2021-05-07-15-46-04.bpo-31904.8dk3la.rst new file mode 100644 index 000000000000..8e81f21997a3 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-05-07-15-46-04.bpo-31904.8dk3la.rst @@ -0,0 +1 @@ +Ignore error string case in test_py_compile ``test_file_not_exists()``.