Skip to content

Commit

Permalink
clean up doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
garybernhardt committed Aug 20, 2012
1 parent f686e47 commit da20589
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions expecter.py
Expand Up @@ -7,6 +7,11 @@ class expect(object):
the value you're making an assertion about:
>>> expect(5) > 4
expect(5)
>>> expect(4) > 4
Traceback (most recent call last):
...
AssertionError: Expected something greater than 4 but got 4
This works for comparisons as you'd expect:
Expand Down Expand Up @@ -196,6 +201,7 @@ def add_expectation(predicate):
>>> add_expectation(is_long)
>>> expect('loooooong').is_long()
>>> expect('short').is_long()
Traceback (most recent call last):
...
AssertionError: Expected that 'short' is_long, but it isn't
Expand Down

0 comments on commit da20589

Please sign in to comment.