mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 21:00:31 +01:00
Implement 2019 day 4
This commit is contained in:
17
2019/tests/test_day04.py
Normal file
17
2019/tests/test_day04.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import pytest
|
||||
|
||||
from aoc2019.day04 import valid
|
||||
|
||||
|
||||
@pytest.mark.parametrize('number,strict,expected', [
|
||||
(122345, False, True),
|
||||
(111123, False, True),
|
||||
(111111, False, True),
|
||||
(223450, False, False),
|
||||
(123789, False, False),
|
||||
(112233, True, True),
|
||||
(123444, True, False),
|
||||
(111122, True, True)
|
||||
])
|
||||
def test_valid(number: int, strict: bool, expected: bool) -> None:
|
||||
assert valid(number, strict) == expected
|
||||
Reference in New Issue
Block a user