diff options
| author | 2021-12-03 14:15:14 +0100 | |
|---|---|---|
| committer | 2021-12-03 14:15:51 +0100 | |
| commit | b062e0f2abc189f352e019bac6854f469e9dfc8c (patch) | |
| tree | 95a7a72cf56061278297f6326c8e3f9519432d53 /day1/__init__.py | |
| parent | f3c3fa9b94bc61b90a029bb74c98215b45c5be15 (diff) | |
| download | 2021-b062e0f2abc189f352e019bac6854f469e9dfc8c.tar.gz 2021-b062e0f2abc189f352e019bac6854f469e9dfc8c.tar.bz2 2021-b062e0f2abc189f352e019bac6854f469e9dfc8c.zip | |
Added tests
Diffstat (limited to 'day1/__init__.py')
| -rw-r--r-- | day1/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/day1/__init__.py b/day1/__init__.py index bc44089..be17935 100644 --- a/day1/__init__.py +++ b/day1/__init__.py | |||
| @@ -11,6 +11,8 @@ class Assignment(BaseAssignment): | |||
| 11 | return list(super().read_input(example)) | 11 | return list(super().read_input(example)) |
| 12 | 12 | ||
| 13 | class AssignmentOne(Assignment): | 13 | class AssignmentOne(Assignment): |
| 14 | example_result = 7 | ||
| 15 | |||
| 14 | def run(self, input: List) -> int: | 16 | def run(self, input: List) -> int: |
| 15 | result = 0 | 17 | result = 0 |
| 16 | 18 | ||
| @@ -21,6 +23,8 @@ class AssignmentOne(Assignment): | |||
| 21 | 23 | ||
| 22 | 24 | ||
| 23 | class AssignmentTwo(Assignment): | 25 | class AssignmentTwo(Assignment): |
| 26 | example_result = 5 | ||
| 27 | |||
| 24 | def run(self, input: List) -> int: | 28 | def run(self, input: List) -> int: |
| 25 | new_input = [ | 29 | new_input = [ |
| 26 | input[i - 2] + input[i - 1] + input[i] | 30 | input[i - 2] + input[i - 1] + input[i] |
