Skip to content

Commit

Permalink
Misc fixes of tests that were wrong
Browse files Browse the repository at this point in the history
The just test was basically really outdated and everything is covered
better by the one in descriptortests

Meanwhile descriptortests had a wrong test for equality (you can't
rely on stable printing here)
  • Loading branch information
DRMacIver committed Mar 18, 2015
1 parent 51c921f commit 15b46a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/hypothesis/descriptortests.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def test_can_round_trip_through_the_database(self, template):
storage.save(template)
values = list(storage.fetch())
assert len(values) == 1
assert repr(template) == repr(values[0])
assert strat.to_basic(template) == strat.to_basic(values[0])

@descriptor_test
def test_template_is_hashable(self, template):
Expand Down
6 changes: 1 addition & 5 deletions tests/test_searchstrategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@ def test_int_lists_no_duplicates_in_simplify():

def test_just_works():
s = strategy(descriptors.just('giving'))
assert s.produce_template(
BuildContext(random), s.draw_parameter(random)) == 'giving'
simplifications = list(s.simplify_such_that('giving', lambda _: True))
assert len(simplifications) == 1
assert simplifications[0] == 'giving'
assert s.example() == "giving"


Litter = namedtuple('Litter', ('kitten1', 'kitten2'))
Expand Down

0 comments on commit 15b46a4

Please sign in to comment.