Skip to content

Commit

Permalink
Fix test even if we redirect test output/errors to file or pager
Browse files Browse the repository at this point in the history
  • Loading branch information
Armin Gruner committed Aug 5, 2020
1 parent c47a4d7 commit a6d71a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion psutil/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def test_create_time(self):
@unittest.skipIf(TRAVIS or CIRRUS, 'not reliable on TRAVIS/CIRRUS')
def test_terminal(self):
terminal = psutil.Process().terminal()
if sys.stdout.isatty():
if sys.stdin.isatty():
tty = os.path.realpath(sh('tty'))
self.assertEqual(terminal, tty)
else:
Expand Down

0 comments on commit a6d71a8

Please sign in to comment.