Skip to content

Commit

Permalink
Fix piped tox test.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartTC committed Aug 13, 2024
1 parent 2e395ed commit 0e59e56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qrcode/tests/test_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def test_isatty(self, mock_print_ascii):
@mock.patch("sys.stdout")
@unittest.skipIf(not Image, "Requires PIL")
def test_piped(self, mock_stdout):
mock_stdout.buffer = io.BytesIO()
mock_stdout.fileno = lambda: 1
main(["testtext"])

@mock.patch("os.isatty", lambda *args: True)
Expand Down

0 comments on commit 0e59e56

Please sign in to comment.