bpo-31904: Skip os.path.expanduser() tests on VxWorks (GH-23776) · python/cpython@b230409

2 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -2467,6 +2467,8 @@ def test_rglob(self):

24672467
24682468

@unittest.skipUnless(hasattr(pwd, 'getpwall'),

24692469

'pwd module does not expose getpwall()')

2470+

@unittest.skipIf(sys.platform == "vxworks",

2471+

"no home directory on VxWorks")

24702472

def test_expanduser(self):

24712473

P = self.cls

24722474

import_helper.import_module('pwd')

Original file line numberDiff line numberDiff line change

@@ -1,5 +1,6 @@

11

import os

22

import posixpath

3+

import sys

34

import unittest

45

from posixpath import realpath, abspath, dirname, basename

56

from test import test_genericpath

@@ -262,6 +263,8 @@ def test_expanduser_home_envvar(self):

262263

self.assertEqual(posixpath.expanduser("~/"), "/")

263264

self.assertEqual(posixpath.expanduser("~/foo"), "/foo")

264265
266+

@unittest.skipIf(sys.platform == "vxworks",

267+

"no home directory on VxWorks")

265268

def test_expanduser_pwd(self):

266269

pwd = import_helper.import_module('pwd')

267270