From 8d4f57dbd10846ffb4881b6509a511be0ab3b913 Mon Sep 17 00:00:00 2001 From: pxinwr Date: Sat, 5 Dec 2020 04:19:32 +0800 Subject: [PATCH] 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) --- Lib/test/test_doctest.py | 3 ++- .../NEWS.d/next/Tests/2020-11-20-15-07-18.bpo-31904.EBJXjJ.rst | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Tests/2020-11-20-15-07-18.bpo-31904.EBJXjJ.rst diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py index bff20f9cac9..6a5013f5b8a 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 00000000000..e5e66ceea44 --- /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.