Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bentaculum committed Jun 17, 2024
1 parent 54955b8 commit 58671f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ ilp =
motile >= 0.2
dev =
pytest
shell
ruff
black
mypy
Expand All @@ -56,7 +55,6 @@ dev =
build
test =
pytest
shell

[options.entry_points]
console_scripts =
Expand Down
15 changes: 7 additions & 8 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
import os
from pathlib import Path

from shell import shell

from test_data import example_dataset


def test_cli_parser():
result = shell("trackastra")
assert result.code == 0
result = os.system("trackastra")
assert result == 0


def test_cli_tracking_from_folder():
example_dataset()
cmd = "trackastra track -i test_data/img -m test_data/TRA --output-ctc test_data/tracked --output-edge-table test_data/tracked.csv --model-pretrained general_2d" # noqa: RUF100
print(cmd)
result = shell(cmd)
result = os.system(cmd)
assert Path("test_data/tracked").exists()
assert Path("test_data/tracked.csv").exists()
assert result.code == 0
assert result == 0


def test_cli_tracking_from_file():
Expand All @@ -29,8 +28,8 @@ def test_cli_tracking_from_file():

cmd = f"trackastra track -i {root / 'trpL_150310-11_img.tif'} -m {root / 'trpL_150310-11_mask.tif'} --output-ctc {output_ctc} --output-edge-table {output_edge_table} --model-pretrained general_2d" # noqa: RUF100
print(cmd)
result = shell(cmd)
result = os.system(cmd)

assert output_ctc.exists()
assert output_edge_table.exists()
assert result.code == 0
assert result == 0

0 comments on commit 58671f4

Please sign in to comment.