Test files and initial data gathering completed
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
from pathlib import Path
|
||||
|
||||
import analyze
|
||||
|
||||
HARVESTING = sorted(Path("tests/images/harvesting").glob("*.png"))
|
||||
NOT_HARVESTING = sorted(Path("tests/images/not_harvesting").glob("*.png"))
|
||||
|
||||
assert len(HARVESTING) > 0, "no images found in tests/images/harvesting"
|
||||
assert len(NOT_HARVESTING) > 0, "no images found in tests/images/not_harvesting"
|
||||
|
||||
|
||||
def test_harvesting_frames_report_harvesting():
|
||||
for path in HARVESTING:
|
||||
image = analyze.load_image(path)
|
||||
assert image is not None, f"cannot load {path}"
|
||||
assert analyze.is_harvesting(image)["is_harvesting"] is True, path
|
||||
|
||||
|
||||
def test_not_harvesting_frames_report_not_harvesting():
|
||||
for path in NOT_HARVESTING:
|
||||
image = analyze.load_image(path)
|
||||
assert image is not None, f"cannot load {path}"
|
||||
assert analyze.is_harvesting(image)["is_harvesting"] is False, path
|
||||
Reference in New Issue
Block a user