Skip to content

Commit 739864b

Browse files
committed
Fix tests
1 parent ef1609d commit 739864b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/v/test_ensure.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ def test_ensured_ints(valconv: BaseConverter):
3232

3333
def test_ensured_lists(valconv: BaseConverter):
3434
"""Validation for lists works."""
35-
assert valconv.structure([1, 2], ensure(list[int], lambda lst: len(lst) > 0))
35+
assert valconv.structure([1, 2], ensure(List[int], lambda lst: len(lst) > 0))
3636

3737
with raises(Exception) as exc:
38-
valconv.structure([], ensure(list[int], lambda lst: len(lst) > 0))
38+
valconv.structure([], ensure(List[int], lambda lst: len(lst) > 0))
3939

4040
if valconv.detailed_validation:
4141
assert isinstance(exc.value, ExceptionGroup)
@@ -63,10 +63,10 @@ def test_ensured_list_elements(valconv: BaseConverter, type):
6363
@mark.skipif(sys.version_info[:2] < (3, 10), reason="Not supported on older Pythons")
6464
def test_ensured_list(valconv: BaseConverter):
6565
"""Ensure works for builtin lists."""
66-
assert valconv.structure([1, 2], ensure(list, elems=ensure(int, lambda i: i > 0)))
66+
assert valconv.structure([1, 2], ensure(List, elems=ensure(int, lambda i: i > 0)))
6767

6868
with raises(Exception) as exc:
69-
valconv.structure([1, -2], ensure(list, elems=ensure(int, lambda i: i > 0)))
69+
valconv.structure([1, -2], ensure(List, elems=ensure(int, lambda i: i > 0)))
7070

7171
if valconv.detailed_validation:
7272
assert isinstance(exc.value, ExceptionGroup)

0 commit comments

Comments
 (0)