Part 1 solution for Day 5.
This commit is contained in:
46
day5/test.py
Normal file
46
day5/test.py
Normal file
@@ -0,0 +1,46 @@
|
||||
import logging
|
||||
from solver import process_data
|
||||
|
||||
logger = logging.getLogger()
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
test_data = r"""
|
||||
47|53
|
||||
97|13
|
||||
97|61
|
||||
97|47
|
||||
75|29
|
||||
61|13
|
||||
75|53
|
||||
29|13
|
||||
97|29
|
||||
53|29
|
||||
61|53
|
||||
97|53
|
||||
61|29
|
||||
47|13
|
||||
75|47
|
||||
97|75
|
||||
47|61
|
||||
75|61
|
||||
47|29
|
||||
75|13
|
||||
53|13
|
||||
|
||||
75,47,61,53,29
|
||||
97,61,53,29,13
|
||||
75,29,13
|
||||
75,97,47,61,53
|
||||
61,13,29
|
||||
97,13,75,29,47
|
||||
"""
|
||||
|
||||
|
||||
def test_main():
|
||||
print("Beginning basic test")
|
||||
result = process_data(iter(test_data.splitlines()))
|
||||
assert result == 143
|
||||
print("Basic test passed")
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_main()
|
||||
Reference in New Issue
Block a user