Skip to content

Commit

Permalink
Update pytest test_suite_files.py
Browse files Browse the repository at this point in the history
  • Loading branch information
datamel committed Feb 19, 2021
1 parent 8320cac commit f115d2c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/unit/test_suite_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,10 @@ def test_get_workflow_source_dir_numbered_run(tmp_path):
run_dir.mkdir()
source_dir = (tmp_path / "cylc-source" / "flow-name")
source_dir.mkdir(parents=True)
assert get_workflow_source_dir(run_dir) is None
assert get_workflow_source_dir(run_dir) == (None, None)
(cylc_install_dir / "source").symlink_to(source_dir)
assert get_workflow_source_dir(run_dir) == str(source_dir)
assert get_workflow_source_dir(run_dir) == (
str(source_dir), cylc_install_dir / "source")


def test_get_workflow_source_dir_named_run(tmp_path):
Expand All @@ -655,7 +656,10 @@ def test_get_workflow_source_dir_named_run(tmp_path):
source_dir = (tmp_path / "cylc-source" / "flow-name")
source_dir.mkdir(parents=True)
(cylc_install_dir / "source").symlink_to(source_dir)
assert get_workflow_source_dir(cylc_install_dir.parent) == str(source_dir)
assert get_workflow_source_dir(
cylc_install_dir.parent) == (
str(source_dir),
cylc_install_dir / "source")


def test_reinstall_workflow(tmp_path, capsys):
Expand Down

0 comments on commit f115d2c

Please sign in to comment.