Skip to content

Commit

Permalink
Test shifting of matched bounds up and down (#60)
Browse files Browse the repository at this point in the history
This patch changes the tests so that we verify that the bounds are
correctly adapted (both up and down) when multiple pre-conditions
related to the bounds are stacked.
  • Loading branch information
mristin authored Jul 8, 2021
1 parent f5974a5 commit 65739ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/strategy_inference/test_matching_bounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ def some_func(x: datetime.date) -> None:
icontract_hypothesis.test_with_inferred_strategy(some_func)

def test_correct_stacked_lower_bound(self) -> None:
@icontract.require(lambda x: 0 < x)
@icontract.require(lambda x: 3 <= x)
@icontract.require(lambda x: 0 < x)
def some_func(x: int) -> None:
pass

Expand All @@ -195,8 +195,8 @@ def some_func(x: int) -> None:
icontract_hypothesis.test_with_inferred_strategy(some_func)

def test_correct_stacked_upper_bound(self) -> None:
@icontract.require(lambda x: x < 100)
@icontract.require(lambda x: x <= 90)
@icontract.require(lambda x: x < 100)
def some_func(x: int) -> None:
pass

Expand Down

0 comments on commit 65739ae

Please sign in to comment.