Skip to content

Commit

Permalink
Fixed tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
apognu committed May 14, 2022
1 parent e176351 commit 6c6ce8a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: abatilo/[email protected]
with:
poetry-version: "1.1.13"
- name: Run linters
- name: Run tests
run: |
poetry config virtualenvs.in-project true
poetry install
Expand Down
5 changes: 4 additions & 1 deletion tests/test_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

@pytest.mark.parametrize("option", ("--help", "-h"))
def test_help(capsys, option) -> None:
main([option])
try:
main([option])
except SystemExit:
pass

output = capsys.readouterr().out

Expand Down
5 changes: 4 additions & 1 deletion tests/test_vaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ def test_no_vaults(a, b, c):
@mock.patch("onep.util.load_session", return_value="dummysession")
@mock.patch("onep.commands.vaults.run", return_value=(True, TWO_VAULTS_OUTPUT, ""))
def test_two_vaults(a, b, c, capsys):
main(["personal", "vaults"])
try:
main(["personal", "vaults"])
except SystemExit:
pass

output = capsys.readouterr().out

Expand Down

0 comments on commit 6c6ce8a

Please sign in to comment.