Skip to content

Commit

Permalink
re-solve 2015 day 1 part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
lancelote committed Dec 1, 2024
1 parent 9c02293 commit f8af151
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tests/src/year2015/test_day01b.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
"""2015 - Day 1 Part 2: Not Quite Lisp."""

import unittest
import pytest

from src.year2015.day01b import solve


class TestSolve(unittest.TestCase):
def test_returns_correct_result(self):
self.assertEqual(solve(")"), 1)
self.assertEqual(solve("()())"), 5)
@pytest.mark.parametrize(
"task,expected",
(
(")", 1),
("()())", 5),
),
)
def test_returns_correct_result(task, expected):
assert solve(task) == expected

0 comments on commit f8af151

Please sign in to comment.