From 75ef64c796e3e4b17eafbe3355b711c8b3f145a5 Mon Sep 17 00:00:00 2001 From: Ettore Dreucci Date: Mon, 7 Dec 2020 11:33:57 +0100 Subject: [PATCH] AoC 2020: day6 and day7, added day_# to test function names Signed-off-by: Ettore Dreucci --- 2020-python/solutions/day_6.py | 4 ++-- 2020-python/solutions/day_7.py | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/2020-python/solutions/day_6.py b/2020-python/solutions/day_6.py index 7205c97..6f47a19 100644 --- a/2020-python/solutions/day_6.py +++ b/2020-python/solutions/day_6.py @@ -49,13 +49,13 @@ def part2(entries: list) -> int: count += 1 return count -def test_input(): +def test_input_day_6(): """pytest testing function""" entries = extract(TEST_INPUT) assert part1(entries) == 11 assert part2(entries) == 6 -def test_bench(benchmark): +def test_bench_day_6(benchmark): """pytest-benchmark function""" benchmark(main) diff --git a/2020-python/solutions/day_7.py b/2020-python/solutions/day_7.py index ec8a685..1142230 100644 --- a/2020-python/solutions/day_7.py +++ b/2020-python/solutions/day_7.py @@ -75,18 +75,16 @@ def part2(graph: dict, color: str) -> int: return count return search_count(graph, color)-1 -def test_input(): +def test_input_day_7(): """pytest testing function""" graph, reverse_graph = extract(TEST_INPUT) assert part1(reverse_graph, "shiny gold") == 4 assert part2(graph, "shiny gold") == 32 -def test_input_2(): - """pytest testing function""" graph, _ = extract(TEST_INPUT_2) assert part2(graph, "shiny gold") == 126 -def test_bench(benchmark): +def test_bench_day_7(benchmark): """pytest-benchmark function""" benchmark(main)