bpo-31904: Skip os.path.expanduser() tests on VxWorks (GH-23776)

This commit is contained in:
pxinwr 2020-12-16 05:24:00 +08:00 committed by GitHub
parent 9a0dea6137
commit b230409f21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View 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')

View 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')