Simplify test input
This commit is contained in:
6
solve.py
6
solve.py
@@ -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:
|
||||
|
Reference in New Issue
Block a user