[+] Add tests

This commit is contained in:
Hykilpikonna
2021-10-03 15:51:09 -04:00
parent 4ddbc457db
commit d936e5df25
+8 -12
View File
@@ -158,36 +158,32 @@ def test_sections_conflict() -> None:
""" """
Test sections_conflict with conflicting sections Test sections_conflict with conflicting sections
""" """
s1 = CON333_LEC2001 assert a2_courses.sections_conflict(CON333_LEC2001, MAT137_LEC0101)
s2 = MAT137_LEC0101 assert a2_courses.sections_conflict(CON123_LEC0321, CSC111_LEC0301)
expected = True
actual = a2_courses.sections_conflict(s1, s2)
assert actual == expected
def test_sections_no_conflict() -> None: def test_sections_no_conflict() -> None:
""" """
Test sections_conflict with non-conflicting sections Test sections_conflict with non-conflicting sections
""" """
s1 = CON123_LEC0123 assert not a2_courses.sections_conflict(CON123_LEC0123, CON123_LEC0321)
s2 = CON123_LEC0321 assert not a2_courses.sections_conflict(CON123_LEC0123, CSC111_LEC0301)
expected = False
actual = a2_courses.sections_conflict(s1, s2)
assert actual == expected
def test_is_valid() -> None: def test_is_valid() -> None:
""" """
Test is_valid with valid schedule Test is_valid with valid schedule
""" """
# TODO: Create a test assert a2_courses.is_valid(SCHEDULE_1)
assert a2_courses.is_valid(SCHEDULE_2)
assert a2_courses.is_valid(SCHEDULE_4)
def test_not_valid() -> None: def test_not_valid() -> None:
""" """
Test is_valid with invalid schedule Test is_valid with invalid schedule
""" """
# TODO: Create a test assert not a2_courses.is_valid(SCHEDULE_3)
def test_2_possible_schedule_combinations() -> None: def test_2_possible_schedule_combinations() -> None: