AoC 2020: day6, benchmark

Signed-off-by: Ettore Dreucci <ettore.dreucci@gmail.com>
This commit is contained in:
2020-12-07 00:29:29 +01:00
parent bbdeed8e8d
commit d99a941116
3 changed files with 7 additions and 2 deletions

View File

@@ -49,12 +49,16 @@ def part2(entries: list) -> int:
count += 1
return count
def test():
def test_input():
"""pytest testing function"""
entries = extract(TEST_INPUT)
assert part1(entries) == 11
assert part2(entries) == 6
def test_bench(benchmark):
"""pytest-benchmark function"""
benchmark(main)
def main():
"""main function"""
input_path = str(pathlib.Path(__file__).resolve().parent.parent) + "/inputs/" + str(pathlib.Path(__file__).stem)