File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -491,15 +491,23 @@ def prepare_reader(self, events):
491
491
492
492
def test_stdin_is_tty (self ):
493
493
# Used during test log analysis to figure out if a TTY was available.
494
- if os .isatty (sys .stdin .fileno ()):
495
- return
496
- self .skipTest ("stdin is not a tty" )
494
+ try :
495
+ if os .isatty (sys .stdin .fileno ()):
496
+ return
497
+ except OSError as ose :
498
+ self .skipTest (f"stdin tty check failed: { ose } " )
499
+ else :
500
+ self .skipTest ("stdin is not a tty" )
497
501
498
502
def test_stdout_is_tty (self ):
499
503
# Used during test log analysis to figure out if a TTY was available.
500
- if os .isatty (sys .stdout .fileno ()):
501
- return
502
- self .skipTest ("stdout is not a tty" )
504
+ try :
505
+ if os .isatty (sys .stdout .fileno ()):
506
+ return
507
+ except OSError as ose :
508
+ self .skipTest (f"stdout tty check failed: { ose } " )
509
+ else :
510
+ self .skipTest ("stdout is not a tty" )
503
511
504
512
def test_basic (self ):
505
513
reader = self .prepare_reader (code_to_events ("1+1\n " ))
You can’t perform that action at this time.
0 commit comments