Skip to content

Commit 261bdb2

Browse files
committed
Test the tests
1 parent 75a3094 commit 261bdb2

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/test_tests.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from .untyped import gen_attr_names
2+
3+
4+
def test_gen_attr_names():
5+
"""We can generate a lot of attribute names."""
6+
assert len(list(gen_attr_names())) == 697
7+
8+
# No duplicates!
9+
assert len(list(gen_attr_names())) == len(set(gen_attr_names()))

tests/test_typeddicts.py

+9
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,21 @@
2727

2828
from ._compat import is_py311_plus
2929
from .typeddicts import (
30+
gen_typeddict_attr_names,
3031
generic_typeddicts,
3132
simple_typeddicts,
3233
simple_typeddicts_with_extra_keys,
3334
)
3435

3536

37+
def test_gen_attr_names():
38+
"""We can generate a lot of attribute names."""
39+
assert len(list(gen_typeddict_attr_names())) == 697
40+
41+
# No duplicates!
42+
assert len(list(gen_typeddict_attr_names())) == len(set(gen_typeddict_attr_names()))
43+
44+
3645
def mk_converter(detailed_validation: bool = True) -> Converter:
3746
"""We can't use function-scoped fixtures with Hypothesis strats."""
3847
c = Converter(detailed_validation=detailed_validation)

0 commit comments

Comments
 (0)