@@ -5379,7 +5379,9 @@ def test_errno_module_has_signatures(self):
5379
5379
5380
5380
def test_faulthandler_module_has_signatures (self ):
5381
5381
import faulthandler
5382
- unsupported_signature = {'dump_traceback' , 'dump_traceback_later' , 'enable' , 'register' }
5382
+ unsupported_signature = {'dump_traceback' , 'dump_traceback_later' , 'enable' }
5383
+ if os .name == 'posix' :
5384
+ unsupported_signature |= {'register' }
5383
5385
self ._test_module_has_signatures (faulthandler , unsupported_signature = unsupported_signature )
5384
5386
5385
5387
def test_functools_module_has_signatures (self ):
@@ -5416,11 +5418,15 @@ def test_operator_module_has_signatures(self):
5416
5418
self ._test_module_has_signatures (operator )
5417
5419
5418
5420
def test_os_module_has_signatures (self ):
5419
- unsupported_signature = {'chmod' , 'get_terminal_size' , 'posix_spawn' , 'posix_spawnp' , 'register_at_fork' , 'utime' }
5421
+ unsupported_signature = {'chmod' , 'get_terminal_size' , 'utime' }
5422
+ if os .name ==
E36D
'posix' :
5423
+ unsupported_signature |= {'posix_spawn' , 'posix_spawnp' , 'register_at_fork' }
5424
+ if os .name == 'nt' :
5425
+ unsupported_signature |= {'startfile' }
5420
5426
self ._test_module_has_signatures (os , unsupported_signature = unsupported_signature )
5421
5427
5422
5428
def test_pwd_module_has_signatures (self ):
5423
- import pwd
5429
+ pwd = import_helper . import_module ( ' pwd' )
5424
5430
self ._test_module_has_signatures (pwd )
5425
5431
5426
5432
def test_re_module_has_signatures (self ):
@@ -5461,10 +5467,14 @@ def test_thread_module_has_signatures(self):
5461
5467
5462
5468
def test_time_module_has_signatures (self ):
5463
5469
no_signature = {
5464
- 'asctime' , 'clock_getres' , 'clock_settime' , 'clock_settime_ns' ,
5465
- 'ctime' , 'get_clock_info' , 'gmtime' , 'localtime' ,
5466
- 'pthread_getcpuclockid' , 'strftime' , 'strptime'
5470
+ 'asctime' , 'ctime' , 'get_clock_info' , 'gmtime' , 'localtime' ,
5471
+ 'strftime' , 'strptime'
5467
5472
}
5473
+ if os .name == 'posix' :
5474
+ no_signature |= {'clock_getres' , 'clock_settime' , 'clock_settime_ns' }
5475
+ for name in ['pthread_getcpuclockid' ]:
5476
+ if hasattr (os , name ):
5477
+ no_signature .add (name )
5468
5478
self ._test_module_has_signatures (time , no_signature )
5469
5479
5470
5480
def test_tokenize_module_has_signatures (self ):
0 commit comments