forked from AFPy/potodo
Saving two lines with suppress!
This commit is contained in:
parent
045aea56c8
commit
15efeaa3de
|
@ -1,3 +1,4 @@
|
|||
from contextlib import suppress
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
@ -16,10 +17,8 @@ def run_potodo(repo_dir, capsys, monkeypatch):
|
|||
monkeypatch.setattr(
|
||||
"sys.argv", ["potodo", "--no-cache", "-p", str(repo_dir)] + argv
|
||||
)
|
||||
try:
|
||||
with suppress(SystemExit):
|
||||
main()
|
||||
except SystemExit:
|
||||
pass
|
||||
return capsys.readouterr()
|
||||
|
||||
return run_it
|
||||
|
|
Loading…
Reference in New Issue
Block a user