fix assertion interpretation when the operator is **

--HG--
branch : trunk
This commit is contained in:
Benjamin Peterson 2010-06-10 13:50:07 -05:00
parent 77a7d576ec
commit 2995d65720
3 changed files with 9 additions and 0 deletions

View File

@ -34,6 +34,7 @@ New features
Bug fixes / Maintenance
++++++++++++++++++++++++++
- fix assertion interpretation with the ** operator
- fix issue105 assignment on the same line as a failing assertion
- fix issue104 proper escaping for test names in junitxml plugin
- fix issue57 -f|--looponfail to work with xpassing tests

View File

@ -92,6 +92,7 @@ operator_map = {
ast.LtE : "<=",
ast.Gt : ">",
ast.GtE : ">=",
ast.Pow : "**",
ast.Is : "is",
ast.IsNot : "is not",
ast.In : "in",

View File

@ -146,6 +146,13 @@ def test_multiple_statements_per_line():
e = exvalue()
assert "assert 1 == 2" in e.msg
def test_power():
try:
assert 2**3 == 7
except AssertionError:
e = exvalue()
assert "assert 8 == 7" in e.msg
class TestView: