Skip to content

Commit

Permalink
test(core): Unify test code
Browse files Browse the repository at this point in the history
  • Loading branch information
j3soon committed Aug 3, 2024
1 parent b8aab21 commit 9b64d1c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 29 deletions.
15 changes: 15 additions & 0 deletions core/tests/test_all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import glob
import os

import nurse_scheduling


def test_all():
for filepath in glob.glob("tests/testcases/*.yaml"):
print(f"Testing '{filepath}' ...")
base_filepath = os.path.splitext(filepath)[0]
df = nurse_scheduling.schedule(filepath, validate=False, deterministic=True)
print(df)
with open(f"{base_filepath}.csv", 'r') as f:
expected_csv = f.read()
assert df.to_csv(index=False, header=False) == expected_csv
11 changes: 0 additions & 11 deletions core/tests/test_example_1.py

This file was deleted.

9 changes: 0 additions & 9 deletions core/tests/test_or_tools_example_1.py

This file was deleted.

9 changes: 0 additions & 9 deletions core/tests/test_or_tools_example_2.py

This file was deleted.

0 comments on commit 9b64d1c

Please sign in to comment.