Skip to content

Commit

Permalink
fix output
Browse files Browse the repository at this point in the history
  • Loading branch information
pomponchik committed Sep 4, 2023
1 parent b89eb3b commit 02c3be1
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions tests/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,12 @@ def test_cli_where(main_runner):
os.remove(script)


def test_run_command_without_arguments(main_runner):
for runner in (subprocess.run, ):
result = runner(['instld'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=100)
def test_run_command_without_arguments():
result = subprocess.run(['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 == ''
assert stderr == f'usage: instld python_file.py [argv ...]{os.linesep}'


def test_test():
print(str.encode(f'usage: instld python_file.py [argv ...]{os.linesep}').decode('utf-8') == f'usage: instld python_file.py [argv ...]{os.linesep}')
assert str.encode(f'usage: instld python_file.py [argv ...]{os.linesep}').decode('utf-8') == f'usage: instld python_file.py [argv ...]{os.linesep}'
assert result.returncode == 1
assert result.stdout.decode('utf-8') == ''
assert result.stderr.decode('utf-8') == f'usage: instld python_file.py [argv ...]{os.linesep}'


def test_run_command_with_arguments(main_runner):
Expand Down

0 comments on commit 02c3be1

Please sign in to comment.