Simplify test input

This commit is contained in:
2024-12-04 22:08:54 -08:00
parent 80b85b459e
commit 00a3bdd07b
6 changed files with 28 additions and 23 deletions

View File

@@ -31,13 +31,15 @@ def main():
try:
print("Testing part 1 solution...")
test_input_p1 = getattr(mod, "test_input_p1", getattr(mod, "test_input", None))
start = time()
assert mod.solve_p1(mod.test_input_p1) == mod.test_solution_p1
assert mod.solve_p1(test_input_p1) == mod.test_solution_p1
print(f"Test passed in {time() - start:.3f} seconds")
print("Testing part 2 solution...")
test_input_p2 = getattr(mod, "test_input_p2", getattr(mod, "test_input", None))
start = time()
assert mod.solve_p2(mod.test_input_p2) == mod.test_solution_p2
assert mod.solve_p2(test_input_p2) == mod.test_solution_p2
print(f"Test passed in {time() - start:.3f} seconds")
except AssertionError: