From: Matthew Fernandez Date: Sat, 17 Oct 2020 22:00:06 +0000 (-0700) Subject: fix some comparisons between booleans and ints in rtest X-Git-Tag: 2.46.0~20^2^2~16^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61e5806264e46458ba4283998db28af5943a26fb;p=graphviz fix some comparisons between booleans and ints in rtest This all worked fine, but for consistency we should be treating these variables as booleans everywhere. --- diff --git a/rtest/rtest.py b/rtest/rtest.py index 0975322a8..bac5bccf1 100755 --- a/rtest/rtest.py +++ b/rtest/rtest.py @@ -293,7 +293,7 @@ def doTest(TEST): CRASH_CNT += 1 print('Test {0}:{1} : == Layout failed =='.format(TESTNAME, i), file=sys.stderr) print(' ' + ' '.join(testcmd), file=sys.stderr) - elif GENERATE == 1: + elif GENERATE: continue elif os.path.exists(os.path.join(REFDIR, OUTFILE)): doDiff(OUTFILE, OUTDIR, REFDIR, TESTNAME, i, SUBTEST['FMT']) @@ -401,9 +401,9 @@ while True: if TEST is None: break doTest(TEST) -if NOOP == 1: +if NOOP: print('No. tests: ' + str(TOT_CNT), file=sys.stderr) -elif GENERATE == 1: +elif GENERATE: print('No. tests: ' + str(TOT_CNT) + ' Layout failures: ' + str(CRASH_CNT), file=sys.stderr) else: print('No. tests: ' +