diff --git a/setup.py b/setup.py index db47f66..89bf641 100644 --- a/setup.py +++ b/setup.py @@ -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(), diff --git a/tstl/harnessmaker.py b/tstl/harnessmaker.py index 2fc7515..46fd0b6 100644 --- a/tstl/harnessmaker.py +++ b/tstl/harnessmaker.py @@ -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) diff --git a/tstl/randomtester.py b/tstl/randomtester.py index 6474c65..96ce730 100644 --- a/tstl/randomtester.py +++ b/tstl/randomtester.py @@ -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:") @@ -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,