Skip to content

Commit

Permalink
Test the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinche committed Dec 3, 2024
1 parent 75a3094 commit 261bdb2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from .untyped import gen_attr_names


def test_gen_attr_names():
"""We can generate a lot of attribute names."""
assert len(list(gen_attr_names())) == 697

# No duplicates!
assert len(list(gen_attr_names())) == len(set(gen_attr_names()))
9 changes: 9 additions & 0 deletions tests/test_typeddicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,21 @@

from ._compat import is_py311_plus
from .typeddicts import (
gen_typeddict_attr_names,
generic_typeddicts,
simple_typeddicts,
simple_typeddicts_with_extra_keys,
)


def test_gen_attr_names():
"""We can generate a lot of attribute names."""
assert len(list(gen_typeddict_attr_names())) == 697

# No duplicates!
assert len(list(gen_typeddict_attr_names())) == len(set(gen_typeddict_attr_names()))


def mk_converter(detailed_validation: bool = True) -> Converter:
"""We can't use function-scoped fixtures with Hypothesis strats."""
c = Converter(detailed_validation=detailed_validation)
Expand Down

0 comments on commit 261bdb2

Please sign in to comment.