Skip to content

Commit

Permalink
Check typing_ext coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Dec 30, 2021
1 parent 183306b commit fab78ef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hypothesis-python/src/hypothesis/strategies/_internal/core.py
Expand Up @@ -1023,7 +1023,7 @@ def as_strategy(strat_or_callable, thing, final=True):
"strings."
)
raise InvalidArgument(f"thing={thing!r} must be a type") # pragma: no cover
if thing in types.TypeAliasTypes: # pragma: no cover
if thing in types.TypeAliasTypes:
# Code like `st.from_type(TypeAlias)` does not make sense.
raise InvalidArgument(
"Cannot resolve TypeAlias to a strategy, "
Expand Down Expand Up @@ -1757,7 +1757,7 @@ def register_type_strategy(

if not types.is_a_type(custom_type):
raise InvalidArgument(f"custom_type={custom_type!r} must be a type")
elif custom_type in types.TypeAliasTypes: # pragma: no cover
elif custom_type in types.TypeAliasTypes:
raise InvalidArgument(
f"custom_type={custom_type!r} is not allowed to be registered, "
"because there is no such thing as a runtime instance of TypeAlias"
Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/tox.ini
Expand Up @@ -131,7 +131,7 @@ commands_pre =
ignore_errors = true
commands =
python -m coverage run --rcfile=.coveragerc --source=hypothesis -m pytest -n0 --strict-markers --ff {posargs} \
tests/cover tests/conjecture tests/datetime tests/numpy tests/pandas tests/lark tests/redis tests/dpcontracts tests/codemods
tests/cover tests/conjecture tests/datetime tests/numpy tests/pandas tests/lark tests/redis tests/dpcontracts tests/codemods tests/typing_extensions
python -m coverage report -m --fail-under=100 --show-missing --skip-covered
python scripts/validate_branch_check.py

Expand Down
1 change: 1 addition & 0 deletions requirements/coverage.in
Expand Up @@ -10,4 +10,5 @@ numpy
pandas
python-dateutil
pytz
typing-extensions
-r test.in
1 change: 1 addition & 0 deletions requirements/coverage.txt
Expand Up @@ -97,6 +97,7 @@ tomli==1.2.3
# via black
typing-extensions==4.0.1
# via
# -r requirements/coverage.in
# black
# libcst
# typing-inspect
Expand Down

0 comments on commit fab78ef

Please sign in to comment.