-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
type: bugproblem that needs to be addressedproblem that needs to be addressed
Description
Originally reported by: Floris Bruynooghe (BitBucket: flub, GitHub: flub)
A global variable is not expanded in the explanation on failure:
var = 7
def test_global():
val = 42
assert var == val
Results in:
$ py.test test_global.py
============================= test session starts ==============================
platform linux2 -- Python 2.7.3 -- pytest-2.2.1
collected 1 items
test_global.py F
=================================== FAILURES ===================================
_________________________________ test_global __________________________________
def test_global():
val = 42
> assert var == val
E assert var == 42
test_global.py:6: AssertionError
=========================== 1 failed in 0.01 seconds ===========================
I would expect the "E" line to say "assert 7 == 42".
Metadata
Metadata
Assignees
Labels
type: bugproblem that needs to be addressedproblem that needs to be addressed