From: pxinwr Date: Tue, 15 Dec 2020 21:24:00 +0000 (+0800) Subject: bpo-31904: Skip os.path.expanduser() tests on VxWorks (GH-23776) X-Git-Tag: v3.10.0a4~166 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b230409f21f5e5b42de6ec10147cd95ae3bdd095;p=thirdparty%2FPython%2Fcpython.git bpo-31904: Skip os.path.expanduser() tests on VxWorks (GH-23776) --- diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py index 7f7f72c62580..9be72941d335 100644 --- a/Lib/test/test_pathlib.py +++ b/Lib/test/test_pathlib.py @@ -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') diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py index 42fd8ef8b174..e18d01f4635a 100644 --- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -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')