mirror of
https://github.com/borgmatic-collective/borgmatic.git
synced 2026-07-30 13:23:01 +02:00
14 lines
392 B
Python
14 lines
392 B
Python
import subprocess
|
|
import sys
|
|
|
|
|
|
def test_borgmatic_command_with_invalid_flag_shows_error_but_not_traceback():
|
|
output = subprocess.run( # noqa: PLW1510
|
|
'borgmatic -v 2 --invalid'.split(' '),
|
|
stdout=subprocess.PIPE,
|
|
stderr=subprocess.STDOUT,
|
|
).stdout.decode(sys.stdout.encoding)
|
|
|
|
assert 'Unrecognized argument' in output
|
|
assert 'Traceback' not in output
|