Skip to content

Commit

Permalink
fix output
Browse files Browse the repository at this point in the history
  • Loading branch information
pomponchik committed Sep 3, 2023
1 parent ccfd0d5 commit b89eb3b
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tests/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,15 @@ def test_cli_where(main_runner):


def test_run_command_without_arguments(main_runner):
for index, runner in enumerate((main_runner, subprocess.run)):
for runner in (subprocess.run, ):
result = runner(['instld'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=100)

stdout = result.stdout.decode('utf-8')
stderr = result.stderr.decode('utf-8')

assert result.returncode == 1
assert stdout == ''
print(repr(stderr))
print(repr(f'usage: instld python_file.py [argv ...]{os.linesep}'))
print(stderr == f'usage: instld python_file.py [argv ...]{os.linesep}')
expect = (stderr == f'usage: instld python_file.py [argv ...]{os.linesep}')

for s1, s2 in zip(stderr, f'usage: instld python_file.py [argv ...]{os.linesep}'):
assert s1 == s2
print(expect)
assert expect
assert stderr == f'usage: instld python_file.py [argv ...]{os.linesep}'


def test_test():
Expand Down

0 comments on commit b89eb3b

Please sign in to comment.