fix assertion interpretation when the operator is **
--HG-- branch : trunk
This commit is contained in:
parent
77a7d576ec
commit
2995d65720
|
@ -34,6 +34,7 @@ New features
|
||||||
Bug fixes / Maintenance
|
Bug fixes / Maintenance
|
||||||
++++++++++++++++++++++++++
|
++++++++++++++++++++++++++
|
||||||
|
|
||||||
|
- fix assertion interpretation with the ** operator
|
||||||
- fix issue105 assignment on the same line as a failing assertion
|
- fix issue105 assignment on the same line as a failing assertion
|
||||||
- fix issue104 proper escaping for test names in junitxml plugin
|
- fix issue104 proper escaping for test names in junitxml plugin
|
||||||
- fix issue57 -f|--looponfail to work with xpassing tests
|
- fix issue57 -f|--looponfail to work with xpassing tests
|
||||||
|
|
|
@ -92,6 +92,7 @@ operator_map = {
|
||||||
ast.LtE : "<=",
|
ast.LtE : "<=",
|
||||||
ast.Gt : ">",
|
ast.Gt : ">",
|
||||||
ast.GtE : ">=",
|
ast.GtE : ">=",
|
||||||
|
ast.Pow : "**",
|
||||||
ast.Is : "is",
|
ast.Is : "is",
|
||||||
ast.IsNot : "is not",
|
ast.IsNot : "is not",
|
||||||
ast.In : "in",
|
ast.In : "in",
|
||||||
|
|
|
@ -146,6 +146,13 @@ def test_multiple_statements_per_line():
|
||||||
e = exvalue()
|
e = exvalue()
|
||||||
assert "assert 1 == 2" in e.msg
|
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:
|
class TestView:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue