Skip to content

Commit

Permalink
Add covering test
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Sep 6, 2021
1 parent c4ea54a commit e88e20d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion hypothesis-python/tests/cover/test_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
# END HEADER

import math
from inspect import Signature, Parameter

import pytest

from hypothesis.internal.compat import ceil, floor
from hypothesis.internal.compat import ceil, floor, get_type_hints

floor_ceil_values = [
-10.7,
Expand All @@ -39,3 +40,13 @@ def test_our_floor_agrees_with_math_floor(value):
@pytest.mark.parametrize("value", floor_ceil_values)
def test_our_ceil_agrees_with_math_ceil(value):
assert ceil(value) == math.ceil(value)


class WeirdSig:
__signature__ = Signature(
parameters=[Parameter(name="args", kind=Parameter.VAR_POSITIONAL)]
)


def test_no_type_hints():
assert get_type_hints(WeirdSig) == {}

0 comments on commit e88e20d

Please sign in to comment.