diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 45c5ef8..e4ecaf9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: - name: Run AoC 2015 run: | cd 2015 - python -m unittest *.py + pytest AoC-2017: runs-on: ubuntu-latest diff --git a/2015/README.md b/2015/README.md index 67d48d7..8e3ecad 100644 --- a/2015/README.md +++ b/2015/README.md @@ -11,5 +11,5 @@ Only Linux has been tested. Other platforms might just work though. ## Compile & run ```bash -python -m unittest *.py +pytest ``` diff --git a/2015/day00.py b/2015/day00.py deleted file mode 100644 index e23c0fd..0000000 --- a/2015/day00.py +++ /dev/null @@ -1,14 +0,0 @@ -import unittest - -from util import read_input - - -class Day01(unittest.TestCase): - - def test_part01(self): - input_data = read_input("day00-input.txt") - - self.assertEqual(input_data, '0') - -if __name__ == '__main__': - unittest.main() diff --git a/2015/day01.py b/2015/day01.py deleted file mode 100644 index aee0e33..0000000 --- a/2015/day01.py +++ /dev/null @@ -1,18 +0,0 @@ -import unittest - -from util import read_input - - -class Day00(unittest.TestCase): - - def test_part01(self): - input_data = read_input("day01-input.txt") - - up = input_data.count(')') - down = input_data.count('(') - floor = abs(up - down) - - self.assertEqual(floor, 138) - -if __name__ == '__main__': - unittest.main() diff --git a/2015/test_day00.py b/2015/test_day00.py new file mode 100644 index 0000000..f3d3319 --- /dev/null +++ b/2015/test_day00.py @@ -0,0 +1,7 @@ +from util import read_input + + +def test_part01(): + input_data = read_input("day00-input.txt") + + assert input_data == '0' diff --git a/2015/test_day01.py b/2015/test_day01.py new file mode 100644 index 0000000..a56a3af --- /dev/null +++ b/2015/test_day01.py @@ -0,0 +1,11 @@ +from util import read_input + + +def test_part01(): + input_data = read_input("day01-input.txt") + + up = input_data.count(')') + down = input_data.count('(') + floor = abs(up - down) + + assert floor == 138