Improve of the test output for logical expression with brackets.

Fixes #925
This commit is contained in:
RedBeardCode
2016-06-25 17:21:10 +02:00
parent c519b9517a
commit e2f550156e
3 changed files with 43 additions and 0 deletions

View File

@@ -720,3 +720,30 @@ def test_issue731(testdir):
""")
result = testdir.runpytest()
assert 'unbalanced braces' not in result.stdout.str()
class TestIssue925():
def test_simple_case(self, testdir):
testdir.makepyfile("""
def test_ternary_display():
assert (False == False) == False
""")
result = testdir.runpytest()
result.stdout.fnmatch_lines('*E*assert (False == False) == False')
def test_long_case(self, testdir):
testdir.makepyfile("""
def test_ternary_display():
assert False == (False == True) == True
""")
result = testdir.runpytest()
result.stdout.fnmatch_lines('*E*assert (False == True) == True')
def test_many_brackets(self, testdir):
testdir.makepyfile("""
def test_ternary_display():
assert True == ((False == True) == True)
""")
result = testdir.runpytest()
result.stdout.fnmatch_lines('*E*assert True == ((False == True) == True)')