Skip to content

Commit

Permalink
assertion matching should be ok now
Browse files Browse the repository at this point in the history
  • Loading branch information
agroce committed Apr 16, 2021
1 parent 52bf94f commit ef0eae0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='tstl',
version='1.2.37',
version='1.2.38',
description='Template scripting testing language (TSTL)',
long_description_content_type="text/markdown",
long_description=open('README.md').read(),
Expand Down
2 changes: 1 addition & 1 deletion tstl/harnessmaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def main():
baseIndent = " "

if "-v" in sys.argv or "--version" in sys.argv:
print("TSTL, version 1.2.37")
print("TSTL, version 1.2.38")
print("Documentation at https://github.com/agroce/tstl")
sys.exit(0)

Expand Down
15 changes: 15 additions & 0 deletions tstl/randomtester.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,10 @@ def handle_failure(
if (not newCov) and (not becauseBranchCov) and (not becauseStatementCov):
failCount += 1
print(msg)
if checkFail:
assert sut.failsCheck(test)
else:
assert sut.fails(test)
f = sut.failure()
print("ERROR:", f)
print("TRACEBACK:")
Expand Down Expand Up @@ -633,6 +637,17 @@ def failProp(x): return sut.failsCheck(x, failure=f)
if config.normalize:
startSimplify = time.time()
print("NORMALIZING...")
if not failProp(test):
print("ALPHA CONVERSION CHANGED FAILURE SIGNATURE FOR ASSERTION, CORRECTING...")
if checkFail:
assert sut.failsCheck(test)
else:
assert sut.fails(test)
f = sut.failure()
if checkFail:
def failProp(x): return sut.failsCheck(x, failure=f)
else:
def failProp(x): return sut.fails(x, failure=f)
test = sut.normalize(
test,
failProp,
Expand Down

0 comments on commit ef0eae0

Please sign in to comment.