diff --git a/puzzles/TEMPLATE_test_dayXX.py b/tests/TEMPLATE_test_dayXX.py similarity index 87% rename from puzzles/TEMPLATE_test_dayXX.py rename to tests/TEMPLATE_test_dayXX.py index 91172a3..46d1a09 100644 --- a/puzzles/TEMPLATE_test_dayXX.py +++ b/tests/TEMPLATE_test_dayXX.py @@ -5,9 +5,13 @@ Remove the 'Not implemented' marks when ready to run the test """ import pathlib import pytest +import sys + +ROOT_DIR = pathlib.Path(__file__).parent.parent +sys.path.append(f"{ROOT_DIR}/puzzles") import dayXX as aoc -INPUTS_DIR = f"{pathlib.Path(__file__).parent.parent}/inputs" +INPUTS_DIR = f"{ROOT_DIR}/inputs" @pytest.fixture def example_data(): diff --git a/puzzles/test_day01.py b/tests/test_day01.py similarity index 82% rename from puzzles/test_day01.py rename to tests/test_day01.py index 04622ac..ff1c075 100644 --- a/puzzles/test_day01.py +++ b/tests/test_day01.py @@ -1,8 +1,12 @@ import pathlib import pytest +import sys + +ROOT_DIR = pathlib.Path(__file__).parent.parent +sys.path.append(f"{ROOT_DIR}/puzzles") import day01 as aoc -INPUTS_DIR = f"{pathlib.Path(__file__).parent.parent}/inputs" +INPUTS_DIR = f"{ROOT_DIR}/inputs" @pytest.fixture def example_data(): diff --git a/puzzles/test_day02.py b/tests/test_day02.py similarity index 85% rename from puzzles/test_day02.py rename to tests/test_day02.py index e02dc3c..b9bead5 100644 --- a/puzzles/test_day02.py +++ b/tests/test_day02.py @@ -1,8 +1,12 @@ import pathlib import pytest +import sys + +ROOT_DIR = pathlib.Path(__file__).parent.parent +sys.path.append(f"{ROOT_DIR}/puzzles") import day02 as aoc -INPUTS_DIR = f"{pathlib.Path(__file__).parent.parent}/inputs" +INPUTS_DIR = f"{ROOT_DIR}/inputs" @pytest.fixture def example_data(): diff --git a/puzzles/test_day03.py b/tests/test_day03.py similarity index 83% rename from puzzles/test_day03.py rename to tests/test_day03.py index de6fa30..adfd576 100644 --- a/puzzles/test_day03.py +++ b/tests/test_day03.py @@ -1,11 +1,12 @@ -""" -Remove the 'Not implemented' marks when ready to run the test -""" import pathlib import pytest +import sys + +ROOT_DIR = pathlib.Path(__file__).parent.parent +sys.path.append(f"{ROOT_DIR}/puzzles") import day03 as aoc -INPUTS_DIR = f"{pathlib.Path(__file__).parent.parent}/inputs" +INPUTS_DIR = f"{ROOT_DIR}/inputs" @pytest.fixture def example_data(): diff --git a/puzzles/test_day04.py b/tests/test_day04.py similarity index 82% rename from puzzles/test_day04.py rename to tests/test_day04.py index 64e10d9..51a9c7c 100644 --- a/puzzles/test_day04.py +++ b/tests/test_day04.py @@ -1,8 +1,12 @@ import pathlib import pytest +import sys + +ROOT_DIR = pathlib.Path(__file__).parent.parent +sys.path.append(f"{ROOT_DIR}/puzzles") import day04 as aoc -INPUTS_DIR = f"{pathlib.Path(__file__).parent.parent}/inputs" +INPUTS_DIR = f"{ROOT_DIR}/inputs" @pytest.fixture def example_data(): diff --git a/puzzles/test_day05.py b/tests/test_day05.py similarity index 82% rename from puzzles/test_day05.py rename to tests/test_day05.py index f78a5e0..cd90bcd 100644 --- a/puzzles/test_day05.py +++ b/tests/test_day05.py @@ -1,8 +1,12 @@ import pathlib import pytest +import sys + +ROOT_DIR = pathlib.Path(__file__).parent.parent +sys.path.append(f"{ROOT_DIR}/puzzles") import day05 as aoc -INPUTS_DIR = f"{pathlib.Path(__file__).parent.parent}/inputs" +INPUTS_DIR = f"{ROOT_DIR}/inputs" @pytest.fixture def example_data(): diff --git a/puzzles/test_day06.py b/tests/test_day06.py similarity index 83% rename from puzzles/test_day06.py rename to tests/test_day06.py index e2a3250..5cad27b 100644 --- a/puzzles/test_day06.py +++ b/tests/test_day06.py @@ -1,8 +1,12 @@ import pathlib import pytest +import sys + +ROOT_DIR = pathlib.Path(__file__).parent.parent +sys.path.append(f"{ROOT_DIR}/puzzles") import day06 as aoc -INPUTS_DIR = f"{pathlib.Path(__file__).parent.parent}/inputs" +INPUTS_DIR = f"{ROOT_DIR}/inputs" @pytest.fixture def example_data(): diff --git a/puzzles/test_day07.py b/tests/test_day07.py similarity index 83% rename from puzzles/test_day07.py rename to tests/test_day07.py index af01a17..42c4057 100644 --- a/puzzles/test_day07.py +++ b/tests/test_day07.py @@ -1,8 +1,12 @@ import pathlib import pytest +import sys + +ROOT_DIR = pathlib.Path(__file__).parent.parent +sys.path.append(f"{ROOT_DIR}/puzzles") import day07 as aoc -INPUTS_DIR = f"{pathlib.Path(__file__).parent.parent}/inputs" +INPUTS_DIR = f"{ROOT_DIR}/inputs" @pytest.fixture def example_data(): diff --git a/puzzles/test_day08.py b/tests/test_day08.py similarity index 82% rename from puzzles/test_day08.py rename to tests/test_day08.py index a21be0b..83c181b 100644 --- a/puzzles/test_day08.py +++ b/tests/test_day08.py @@ -1,8 +1,12 @@ import pathlib import pytest +import sys + +ROOT_DIR = pathlib.Path(__file__).parent.parent +sys.path.append(f"{ROOT_DIR}/puzzles") import day08 as aoc -INPUTS_DIR = f"{pathlib.Path(__file__).parent.parent}/inputs" +INPUTS_DIR = f"{ROOT_DIR}/inputs" @pytest.fixture def example_data():