From c973fc77c74fb50c01e66950a046cb5b050c48b1 Mon Sep 17 00:00:00 2001 From: Mateusz Masiarz Date: Fri, 19 Apr 2024 13:35:25 +0200 Subject: [PATCH] Add test for oiejq reinstall --- tests/test_oiejq.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_oiejq.py b/tests/test_oiejq.py index c71f5480..16f69bab 100644 --- a/tests/test_oiejq.py +++ b/tests/test_oiejq.py @@ -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():