Skip to content

Commit

Permalink
[Tests] Add test for invalid job sequences in `Schedule.from_job_sequ…
Browse files Browse the repository at this point in the history
…ences`
  • Loading branch information
Pabloo22 committed Oct 9, 2024
1 parent c5252c8 commit f9e4b04
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ def test_from_job_sequences(example_job_shop_instance: JobShopInstance):
assert schedule.makespan() == 11


def test_from_job_sequences_invalid(example_job_shop_instance: JobShopInstance):
job_sequences = [
[0, 1, 2],
[2, 0, 1],
[1, 0, 2],
]
with pytest.raises(ValidationError):
Schedule.from_job_sequences(
example_job_shop_instance, job_sequences
)


def test_to_dict(example_job_shop_instance: JobShopInstance):
job_sequences = [
[0, 2, 1],
Expand Down

0 comments on commit f9e4b04

Please sign in to comment.