From c18f311e0a502545157e774b3ca32a15eb62e08f Mon Sep 17 00:00:00 2001 From: Stegallo Date: Sat, 9 Dec 2023 11:33:15 -0800 Subject: [PATCH] test day3 --- tests/y_2023/test_2023_day3.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/y_2023/test_2023_day3.py diff --git a/tests/y_2023/test_2023_day3.py b/tests/y_2023/test_2023_day3.py new file mode 100644 index 0000000..232aa3c --- /dev/null +++ b/tests/y_2023/test_2023_day3.py @@ -0,0 +1,32 @@ +from __future__ import annotations + +from unittest.mock import mock_open, patch + +from y_2023.day3 import Day, Number, extract_numbers + +with patch("builtins.open", mock_open(read_data="0")): + day = Day() + + +def test_extract_numbers(): + print() + res = extract_numbers("467..114..", 0) + print(f"{res=}") + assert res == [ + Number(467, 0, 0, 3), + Number(114, 0, 5, 3), + ] + assert extract_numbers("467", 0) == [Number(467, 0, 0, 3)] + # assert False + + +def test__preprocess_input(): + assert True + + +def test_calculate_1(): + assert True + + +def test_calculate_2(): + assert True