Created
March 26, 2014 11:53
-
-
Save andreastt/9781575 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get(): | |
return 0 | |
def test_foo(): | |
a = 42 | |
assert a == get() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ $ py.test test.py | |
============================= test session starts ============================== | |
platform darwin -- Python 2.7.5 -- py-1.4.20 -- pytest-2.5.2 | |
collected 1 items | |
test.py F | |
=================================== FAILURES =================================== | |
___________________________________ test_foo ___________________________________ | |
def test_foo(): | |
a = 42 | |
> assert a == get() | |
E assert 42 == 0 | |
E + where 0 = get() | |
test.py:6: AssertionError | |
=========================== 1 failed in 0.02 seconds =========================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment