File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 66from test .support import warnings_helper
77from test .support .script_helper import assert_python_ok
88
9- # Skip these tests if there is no posix module.
10- posix = import_helper .import_module ('posix' )
11-
129import errno
1310import sys
1411import signal
2219import textwrap
2320from contextlib import contextmanager
2421
22+ try :
23+ import posix
24+ except ImportError :
25+ import nt as posix
26+
2527try :
2628 import pwd
2729except ImportError :
@@ -1009,6 +1011,7 @@ def test_environ(self):
10091011 self .assertEqual (type (k ), item_type )
10101012 self .assertEqual (type (v ), item_type )
10111013
1014+ @unittest .skipUnless (os .name == 'posix' , "see bug gh-111841" )
10121015 def test_putenv (self ):
10131016 with self .assertRaises (ValueError ):
10141017 os .putenv ('FRUIT\0 VEGETABLE' , 'cabbage' )
@@ -1220,6 +1223,7 @@ def test_sched_setaffinity(self):
12201223 self .assertRaises (OSError , posix .sched_setaffinity , - 1 , mask )
12211224
12221225 @unittest .skipIf (support .is_wasi , "No dynamic linking on WASI" )
1226+ @unittest .skipUnless (os .name == 'posix' , "POSIX-only test" )
12231227 def test_rtld_constants (self ):
12241228 # check presence of major RTLD_* constants
12251229 posix .RTLD_LAZY
You can’t perform that action at this time.
0 commit comments