Adjust a couple of "assert"s

This commit is contained in:
rocky
2020-02-04 22:06:48 -05:00
parent 3120de0c02
commit 9166fb54a1

View File

@@ -139,13 +139,16 @@ class TreeTransform(GenericASTTraversal, object):
and 1 <= len(testtrue_or_false) <= 2
and raise_stmt.first_child().pattr == "AssertionError"
):
if testtrue_or_false == "testtrue":
if testtrue_or_false in ("testtrue", "testtruel"):
# Skip over the testtrue because because it would
# produce a "not" and we don't want that here.
assert_expr = testtrue_or_false[0]
jump_cond = NoneToken
else:
assert testtrue_or_false == "testfalse"
try:
assert testtrue_or_false in ("testfalse", "testfalsel")
except:
from trepan.api import debug; debug()
assert_expr = testtrue_or_false[0]
if assert_expr == "testfalse_not_and":
# FIXME: come pack to stuff like this