Skip to content

Commit

Permalink
Update test_plugin.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Garulf committed Jan 10, 2024
1 parent f98560c commit a1ce2a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ def test_settings():
def test_run_dir(tmp_path, monkeypatch):
monkeypatch.setattr('sys.argv', [tmp_path / 'plugin.py'])
plugin = Plugin()
assert plugin.plugin_run_dir() == tmp_path
assert plugin.run_dir == tmp_path


def test_root_dir(tmp_path, monkeypatch):
monkeypatch.setattr('sys.argv', [tmp_path / 'plugin.py'])
monkeypatch.setattr('pyflowlauncher.plugin.Path.exists', lambda _: True)
plugin = Plugin()
assert plugin.plugin_root_dir() == tmp_path
assert plugin.root_dir() == tmp_path


def test_root_dir_not_found(tmp_path, monkeypatch):
monkeypatch.setattr('sys.argv', [tmp_path / 'plugin.py'])
monkeypatch.setattr('pyflowlauncher.plugin.Path.exists', lambda _: False)
plugin = Plugin()
with pytest.raises(FileNotFoundError):
assert plugin.plugin_root_dir() == tmp_path
assert plugin.root_dir() == tmp_path

0 comments on commit a1ce2a4

Please sign in to comment.