Skip to content

Commit a67cbc2

Browse files
committed
chore(aoc): fix tests day 04/2023
1 parent 5aed1e0 commit a67cbc2

File tree

5 files changed

+11
-160
lines changed

5 files changed

+11
-160
lines changed
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
## Day 04: Scratchcards
22

3-
https://adventofcode.com/2023/day/4
4-
5-
Part One: `23847`
6-
7-
Part Two: `8570000`
8-
9-
*Demo: `13` and `30`*
3+
https://adventofcode.com/2023/day/4

advent_of_code/year_2023/day_04_scratchcards/test_day_04_2023.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import os
2+
from dotenv import load_dotenv
23
from .solution_day_04_2023 import solve_day_04_2023
34

5+
load_dotenv()
6+
environment = os.getenv("ENVIRONMENT")
7+
48
filename_demo = "input_demo.txt"
59
filename = "input.txt"
610
current_dir = os.path.dirname(os.path.abspath(__file__))
@@ -11,8 +15,11 @@
1115
def test_day_04_2023():
1216
result_demo = solve_day_04_2023(file_path_demo)
1317
assert result_demo == (13, 30)
14-
result = solve_day_04_2023(file_path)
15-
assert result == (23847, 8570000)
18+
if environment == "development":
19+
expected_results = (int(os.getenv("SOLUTION_01_DAY_04_2023")),
20+
int(os.getenv("SOLUTION_02_DAY_04_2023")))
21+
results = solve_day_04_2023(file_path)
22+
assert expected_results == results
1623

1724

1825

learning/python-workbook/.gitignore

Lines changed: 0 additions & 129 deletions
This file was deleted.

learning/python-workbook/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[pytest]
2-
addopts = --cov=. --cov-report=term-missing
2+
# addopts = --cov=. --cov-report=term-missing

0 commit comments

Comments
 (0)