Skip to content

Commit fab78ef

Browse files
committed
Check typing_ext coverage
1 parent 183306b commit fab78ef

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

hypothesis-python/src/hypothesis/strategies/_internal/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ def as_strategy(strat_or_callable, thing, final=True):
10231023
"strings."
10241024
)
10251025
raise InvalidArgument(f"thing={thing!r} must be a type") # pragma: no cover
1026-
if thing in types.TypeAliasTypes: # pragma: no cover
1026+
if thing in types.TypeAliasTypes:
10271027
# Code like `st.from_type(TypeAlias)` does not make sense.
10281028
raise InvalidArgument(
10291029
"Cannot resolve TypeAlias to a strategy, "
@@ -1757,7 +1757,7 @@ def register_type_strategy(
17571757

17581758
if not types.is_a_type(custom_type):
17591759
raise InvalidArgument(f"custom_type={custom_type!r} must be a type")
1760-
elif custom_type in types.TypeAliasTypes: # pragma: no cover
1760+
elif custom_type in types.TypeAliasTypes:
17611761
raise InvalidArgument(
17621762
f"custom_type={custom_type!r} is not allowed to be registered, "
17631763
"because there is no such thing as a runtime instance of TypeAlias"

hypothesis-python/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ commands_pre =
131131
ignore_errors = true
132132
commands =
133133
python -m coverage run --rcfile=.coveragerc --source=hypothesis -m pytest -n0 --strict-markers --ff {posargs} \
134-
tests/cover tests/conjecture tests/datetime tests/numpy tests/pandas tests/lark tests/redis tests/dpcontracts tests/codemods
134+
tests/cover tests/conjecture tests/datetime tests/numpy tests/pandas tests/lark tests/redis tests/dpcontracts tests/codemods tests/typing_extensions
135135
python -m coverage report -m --fail-under=100 --show-missing --skip-covered
136136
python scripts/validate_branch_check.py
137137

requirements/coverage.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ numpy
1010
pandas
1111
python-dateutil
1212
pytz
13+
typing-extensions
1314
-r test.in

requirements/coverage.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ tomli==1.2.3
9797
# via black
9898
typing-extensions==4.0.1
9999
# via
100+
# -r requirements/coverage.in
100101
# black
101102
# libcst
102103
# typing-inspect

0 commit comments

Comments
 (0)