Skip to content

Commit

Permalink
test(pythonapi): clean test pythonapi
Browse files Browse the repository at this point in the history
  • Loading branch information
camilovelezr committed Jan 24, 2024
1 parent f195f56 commit d04bb98
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions tests/test_pythonapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,20 +359,18 @@ def test_validate2(assembler_step: Step, tmp_path: Path) -> None:
def test_wf1(basic_step: Step,
assembler_step: Step,
renaming_step: Step,
tmp_path: Path) -> None:
) -> None:
"""Test WF1"""
wf_path = tmp_path.joinpath("wf")
with pytest.raises(InvalidStepError):
Workflow([basic_step, assembler_step, renaming_step],
name="wf1", _path=wf_path)
name="wf1")


def test_wf2(basic_step: Step,
assembler_step: Step,
renaming_step: Step,
tmp_path: Path) -> None:
"""Test WF2"""
wf_path = tmp_path.joinpath("wf")
basic_step.inpDir = tmp_path / "in"
basic_step.filePattern = ".*_{row:c}{col:dd}_s{s:d}_w{channel:d}.*.ome.tif"
basic_step.getDarkfield = False
Expand All @@ -381,15 +379,14 @@ def test_wf2(basic_step: Step,
renaming_step.inpDir = assembler_step.outDir
with pytest.raises(InvalidStepError):
Workflow([basic_step, assembler_step, renaming_step],
name="wf1", _path=wf_path)
name="wf1")


def test_wf3(basic_step: Step,
assembler_step: Step,
renaming_step: Step,
tmp_path: Path) -> None:
"""Test WF3"""
wf_path = tmp_path.joinpath("wf")
basic_step.inpDir = tmp_path / "in"
basic_step.filePattern = ".*_{row:c}{col:dd}_s{s:d}_w{channel:d}.*.ome.tif"
basic_step.getDarkfield = False
Expand All @@ -400,17 +397,15 @@ def test_wf3(basic_step: Step,
renaming_step.outFilePattern = "x{row:dd}_y{col:dd}_p{s:dd}_c{channel:d}.ome.tif"
renaming_step.outDir = tmp_path / "out"
wf = Workflow([basic_step, assembler_step, renaming_step],
name="wf1", _path=wf_path)
name="wf1")
assert wf.name == "wf1"
# assert wf._path == wf_path


def test_wf4(basic_step: Step,
assembler_step: Step,
renaming_step: Step,
tmp_path: Path) -> None:
"""Test WF4"""
wf_path = tmp_path.joinpath("wf")
basic_step.inpDir = tmp_path / "in"
basic_step.filePattern = ".*_{row:c}{col:dd}_s{s:d}_w{channel:d}.*.ome.tif"
basic_step.getDarkfield = False
Expand All @@ -422,7 +417,7 @@ def test_wf4(basic_step: Step,
renaming_step.outDir = tmp_path / "out"
with pytest.raises(InvalidStepError):
Workflow([basic_step, assembler_step, renaming_step],
name="wf1", _path=wf_path)
name="wf1")


def test_compile_1(basic_step: Step,
Expand Down

0 comments on commit d04bb98

Please sign in to comment.