Skip to content

Commit

Permalink
test: test param helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
FlickerSoul committed Oct 29, 2023
1 parent 17b6ad3 commit 269540a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_test_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,21 @@ def square(a: int) -> int:
@problem()
def square(a: int) -> int:
return a**2


def test_test_params_params() -> None:
@test_cases.params([1], [2], [3])
@problem()
def square(a: int) -> int:
return a**2

assert len(square.test_cases) == 3


def test_test_params_param_iter() -> None:
@test_cases.param_iter([i] for i in range(3))
@problem()
def square(a: int) -> int:
return a**2

assert len(square.test_cases) == 3

0 comments on commit 269540a

Please sign in to comment.