Skip to content

Commit

Permalink
Add test for oiejq reinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
MasloMaslane committed Apr 19, 2024
1 parent 83b6438 commit c973fc7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_oiejq.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ def test_install_oiejq():
with pytest.raises(SystemExit):
oiejq.install_oiejq()

# Test if oiejq is reinstalled when oiejq.sh is changed
os.rmdir(os.path.expanduser('~/.local/bin/oiejq'))
oiejq.install_oiejq()
with open(os.path.expanduser('~/.local/bin/oiejq'), 'a') as f:
f.write('\n')
assert not oiejq.check_oiejq()
oiejq.install_oiejq()


@pytest.mark.github_runner
def test_check_oiejq():
Expand Down

0 comments on commit c973fc7

Please sign in to comment.