diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2016-01-27 10:44:41 +0100 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2019-12-05 15:06:44 +0100 |
commit | e1bba5d977a8b9385e9ffdb05861833485003d23 (patch) | |
tree | 40876bb3d289ced0fd871e94cc9e79c9e934327b /test/ConfirmTests.py | |
parent | e264eb618b8eabf9670084f40687af916a63567e (diff) | |
download | fork-ledger-e1bba5d977a8b9385e9ffdb05861833485003d23.tar.gz fork-ledger-e1bba5d977a8b9385e9ffdb05861833485003d23.tar.bz2 fork-ledger-e1bba5d977a8b9385e9ffdb05861833485003d23.zip |
Make tests scripts Python 3 compatible
Diffstat (limited to 'test/ConfirmTests.py')
-rwxr-xr-x | test/ConfirmTests.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/ConfirmTests.py b/test/ConfirmTests.py index dffa74a6..2ecefa01 100755 --- a/test/ConfirmTests.py +++ b/test/ConfirmTests.py @@ -1,5 +1,7 @@ #!/usr/bin/python +from __future__ import print_function + # This script confirms both that the register report "adds up", and that its # final balance is the same as what the balance report shows. @@ -56,9 +58,9 @@ def confirm_report(command): if re.search(' -[VGB] ', command) and diff < 0.015: diff = 0.0 if diff > 0.001: - print "DISCREPANCY: %.3f (%.3f - %.3f) at line %d:" % \ + print("DISCREPANCY: %.3f (%.3f - %.3f) at line %d:" % \) (running_total - total, running_total, total, index) - print line, + print(line,) running_total = total failure = True @@ -77,10 +79,10 @@ def confirm_report(command): if re.search(' -[VGB] ', command) and diff < 0.015: diff = 0.0 if diff > 0.001: - print - print "DISCREPANCY: %.3f (%.3f - %.3f) between register and balance" % \ + print() + print("DISCREPANCY: %.3f (%.3f - %.3f) between register and balance" % \) (balance_total - running_total, balance_total, running_total) - print last_line, + print(last_line,) failure = True return not failure |