Skip to content

Instantly share code, notes, and snippets.

@andreastt
Created March 26, 2014 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreastt/9781575 to your computer and use it in GitHub Desktop.
Save andreastt/9781575 to your computer and use it in GitHub Desktop.
def get():
return 0
def test_foo():
a = 42
assert a == get()
~ $ 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