-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b2b5b2
commit d0ef56f
Showing
6 changed files
with
55 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,3 @@ | ||
# --- Day 0: Template --- | ||
|
||
To be used as template for the other days. |
Empty file.
Empty file.
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,16 @@ | ||
import os | ||
import sys | ||
|
||
sys.path.append(".") | ||
|
||
from solutions import part1, part2 | ||
|
||
from utils.inputs import get_inputs | ||
from utils.timings import profile_run | ||
|
||
if __name__ == "__main__": | ||
input_path = f"{os.path.dirname(os.path.realpath(__file__))}/input.txt" | ||
inputs = get_inputs(input_path) | ||
|
||
profile_run("Part 1", lambda: part1(inputs)) | ||
profile_run("Part 2", lambda: part2(inputs)) |
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,6 @@ | ||
def part1(inputs: list[str]) -> int: | ||
return 1 | ||
|
||
|
||
def part2(inputs: list[str]) -> int: | ||
return 2 |
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,30 @@ | ||
import os | ||
|
||
import pytest | ||
from solutions import part1, part2 | ||
|
||
from utils.inputs import get_inputs | ||
|
||
current_dir = os.path.dirname(os.path.realpath(__file__)) | ||
|
||
input = get_inputs(f"{current_dir}/input.txt") | ||
input_test = get_inputs(f"{current_dir}/input_test.txt") | ||
|
||
|
||
class TestPart1: | ||
def test_with_test_data(self): | ||
assert part1(input_test) == 1 | ||
|
||
@pytest.mark.skip(reason="not implemented") | ||
def test_with_real_data(self): | ||
assert part1(input) == 1 | ||
|
||
|
||
class TestPart2: | ||
@pytest.mark.skip(reason="not implemented") | ||
def test_with_test_data(self): | ||
assert part2(input_test) == 2 | ||
|
||
@pytest.mark.skip(reason="not implemented") | ||
def test_with_real_data(self): | ||
assert part2(input) == 2 |