File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2430,15 +2430,15 @@ def test_is_char_device_false(self):
2430
2430
self .assertIs ((P / 'fileA\x00 ' ).is_char_device (), False )
2431
2431
2432
2432
def test_is_char_device_true (self ):
2433
- # Under Unix, /dev/null should generally be a char device.
2434
- P = self .cls ('/dev/null' )
2433
+ # os.devnull should generally be a char device.
2434
+ P = self .cls (os . devnull )
2435
2435
if not P .exists ():
2436
- self .skipTest ("/dev/ null required" )
2436
+ self .skipTest ("null device required" )
2437
2437
self .assertTrue (P .is_char_device ())
2438
2438
self .assertFalse (P .is_block_device ())
2439
2439
self .assertFalse (P .is_file ())
2440
- self .assertIs (self .cls ('/dev/null \udfff ' ).is_char_device (), False )
2441
- self .assertIs (self .cls ('/dev/null \x00 ' ).is_char_device (), False )
2440
+ self .assertIs (self .cls (f' { os . devnull } \udfff ' ).is_char_device (), False )
2441
+ self .assertIs (self .cls (f' { os . devnull } \x00 ' ).is_char_device (), False )
2442
2442
2443
2443
def test_pickling_common (self ):
2444
2444
p = self .cls (BASE , 'fileA' )
You can’t perform that action at this time.
0 commit comments