]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-31904: Skip os.path.expanduser() tests on VxWorks (GH-23776)
authorpxinwr <peixing.xin@windriver.com>
Tue, 15 Dec 2020 21:24:00 +0000 (05:24 +0800)
committerGitHub <noreply@github.com>
Tue, 15 Dec 2020 21:24:00 +0000 (22:24 +0100)
Lib/test/test_pathlib.py
Lib/test/test_posixpath.py

index 7f7f72c625806f76b33b89fc7fe2be235979c6a7..9be72941d33544e5f16d3dc2ff4efe20cc6b7139 100644 (file)
@@ -2467,6 +2467,8 @@ class PosixPathTest(_BasePathTest, unittest.TestCase):
 
     @unittest.skipUnless(hasattr(pwd, 'getpwall'),
                          'pwd module does not expose getpwall()')
+    @unittest.skipIf(sys.platform == "vxworks",
+                     "no home directory on VxWorks")
     def test_expanduser(self):
         P = self.cls
         import_helper.import_module('pwd')
index 42fd8ef8b17465a7081e17371820a30f7a6a54fa..e18d01f4635a3a8f0b4fb83561ff9464a601e2fe 100644 (file)
@@ -1,5 +1,6 @@
 import os
 import posixpath
+import sys
 import unittest
 from posixpath import realpath, abspath, dirname, basename
 from test import test_genericpath
@@ -262,6 +263,8 @@ class PosixPathTest(unittest.TestCase):
                     self.assertEqual(posixpath.expanduser("~/"), "/")
                     self.assertEqual(posixpath.expanduser("~/foo"), "/foo")
 
+    @unittest.skipIf(sys.platform == "vxworks",
+                     "no home directory on VxWorks")
     def test_expanduser_pwd(self):
         pwd = import_helper.import_module('pwd')