From: pxinwr Date: Fri, 4 Dec 2020 20:19:32 +0000 (+0800) Subject: bpo-31904: fix test_doctest.py failures for VxWorks (GH-23419) X-Git-Tag: v3.10.0a3~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d4f57dbd10846ffb4881b6509a511be0ab3b913;p=thirdparty%2FPython%2Fcpython.git bpo-31904: fix test_doctest.py failures for VxWorks (GH-23419) Fix test_doctest.py failures for VxWorks by avoiding exact error message checks. (better for everyone all around) --- diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py index bff20f9cac9c..6a5013f5b8af 100644 --- a/Lib/test/test_doctest.py +++ b/Lib/test/test_doctest.py @@ -3039,10 +3039,11 @@ Invalid file name: ... '-m', 'doctest', 'nosuchfile') >>> rc, out (1, b'') + >>> # The exact error message changes depending on the platform. >>> print(normalize(err)) # doctest: +ELLIPSIS Traceback (most recent call last): ... - FileNotFoundError: [Errno ...] No such file or directory: 'nosuchfile' + FileNotFoundError: [Errno ...] ...nosuchfile... Invalid doctest option: diff --git a/Misc/NEWS.d/next/Tests/2020-11-20-15-07-18.bpo-31904.EBJXjJ.rst b/Misc/NEWS.d/next/Tests/2020-11-20-15-07-18.bpo-31904.EBJXjJ.rst new file mode 100644 index 000000000000..e5e66ceea440 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-11-20-15-07-18.bpo-31904.EBJXjJ.rst @@ -0,0 +1 @@ +Fix test_doctest.py failures for VxWorks.