Skip to content

Commit

Permalink
TestCommand: Make more use of universal_newlines
Browse files Browse the repository at this point in the history
To always have string output from subprocesses in Python 2/3
  • Loading branch information
userzimmermann committed Jul 28, 2019
1 parent 1e4e911 commit 5c46c49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_nodely_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def test_check_output(
node_package_command_output_regex):
command = Command(node_package_command)
assert node_package_command_output_regex.match(
command.check_output(node_package_command_args))
command.check_output(
node_package_command_args, universal_newlines=True))

out, err = capfd.readouterr()
assert not out and not err
Expand All @@ -159,7 +160,7 @@ def test__call__(
node_package_command_output_regex):
command = Command(node_package_command)
assert node_package_command_output_regex.match(
command(*node_package_command_args))
command(*node_package_command_args, universal_newlines=True))

out, err = capfd.readouterr()
assert not out and not err
Expand Down

0 comments on commit 5c46c49

Please sign in to comment.