-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #225 from Stegallo/2023
test day3
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |