[Python-checkins] bpo-41439: Skip test_ssl and test_uuid tests if fork() is not supported (GH-21684)

vstinner webhook-mailer at python.org
Tue Dec 8 18:20:23 EST 2020


https://github.com/python/cpython/commit/98a54171932584883cb3973f78dd30f92d7a3a78
commit: 98a54171932584883cb3973f78dd30f92d7a3a78
branch: master
author: pxinwr <peixing.xin at windriver.com>
committer: vstinner <vstinner at python.org>
date: 2020-12-09T00:20:19+01:00
summary:

bpo-41439: Skip test_ssl and test_uuid tests if fork() is not supported (GH-21684)

files:
A Misc/NEWS.d/next/Tests/2020-07-30-14-08-58.bpo-41439.yhteoi.rst
M Lib/test/test_ssl.py
M Lib/test/test_uuid.py

diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index e5cd962e84710..67850c34e00c2 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -391,7 +391,7 @@ def test_random(self):
         ssl.RAND_add(b"this is a random bytes object", 75.0)
         ssl.RAND_add(bytearray(b"this is a random bytearray object"), 75.0)
 
-    @unittest.skipUnless(os.name == 'posix', 'requires posix')
+    @unittest.skipUnless(hasattr(os, 'fork'), 'need os.fork')
     def test_random_fork(self):
         status = ssl.RAND_status()
         if not status:
diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py
old mode 100644
new mode 100755
index 718113d6e1bb2..d6a8333427a4a
--- a/Lib/test/test_uuid.py
+++ b/Lib/test/test_uuid.py
@@ -639,7 +639,7 @@ def test_uuid5(self):
             equal(u, self.uuid.UUID(v))
             equal(str(u), v)
 
-    @unittest.skipUnless(os.name == 'posix', 'requires Posix')
+    @unittest.skipUnless(hasattr(os, 'fork'), 'need os.fork')
     def testIssue8621(self):
         # On at least some versions of OSX self.uuid.uuid4 generates
         # the same sequence of UUIDs in the parent and any
diff --git a/Misc/NEWS.d/next/Tests/2020-07-30-14-08-58.bpo-41439.yhteoi.rst b/Misc/NEWS.d/next/Tests/2020-07-30-14-08-58.bpo-41439.yhteoi.rst
new file mode 100644
index 0000000000000..0451503a52e93
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2020-07-30-14-08-58.bpo-41439.yhteoi.rst
@@ -0,0 +1 @@
+Port test_ssl and test_uuid to VxWorks RTOS.



More information about the Python-checkins mailing list