[Python-checkins] bpo-31904: fix test_doctest.py failures for VxWorks (GH-23419)

gpshead webhook-mailer at python.org
Fri Dec 4 15:19:41 EST 2020


https://github.com/python/cpython/commit/8d4f57dbd10846ffb4881b6509a511be0ab3b913
commit: 8d4f57dbd10846ffb4881b6509a511be0ab3b913
branch: master
author: pxinwr <peixing.xin at windriver.com>
committer: gpshead <greg at krypto.org>
date: 2020-12-04T12:19:32-08:00
summary:

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)

files:
A Misc/NEWS.d/next/Tests/2020-11-20-15-07-18.bpo-31904.EBJXjJ.rst
M Lib/test/test_doctest.py

diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index bff20f9cac9c9..6a5013f5b8afc 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -3039,10 +3039,11 @@ def test_CLI(): r"""
     ...         '-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 0000000000000..e5e66ceea4402
--- /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.



More information about the Python-checkins mailing list