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/regress/9188F587.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/regress/9188F587.py')
-rw-r--r-- | test/regress/9188F587.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/test/regress/9188F587.py b/test/regress/9188F587.py index 50195252..9095d58c 100644 --- a/test/regress/9188F587.py +++ b/test/regress/9188F587.py @@ -1,3 +1,5 @@ +from __future__ import print_function + import ledger eur = ledger.commodities.find_or_create('EUR') @@ -7,8 +9,8 @@ total_gbp = ledger.Amount("0.00 GBP") total = ledger.Amount("0.00 EUR") for post in ledger.read_journal("test/regress/78AB4B87.dat").query("^income:"): - print post.amount - print post.amount.commodity + print(post.amount) + print(post.amount.commodity) if post.amount.commodity == "EUR": total_eur += post.amount elif post.amount.commodity == "GBP": @@ -16,12 +18,12 @@ for post in ledger.read_journal("test/regress/78AB4B87.dat").query("^income:"): a = post.amount.value(eur, post.date) if a: - print "Total is presently: (%s)" % total - print "Converted to EUR: (%s)" % a + print("Total is presently: (%s)" % total) + print("Converted to EUR: (%s)" % a) total += a - print "Total is now: (%s)" % total + print("Total is now: (%s)" % total) else: - print "Cannot convert '%s'" % post.amount - print + print("Cannot convert '%s'" % post.amount) + print() -print total +print(total) |