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/B21BF389.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/B21BF389.py')
-rw-r--r-- | test/regress/B21BF389.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/regress/B21BF389.py b/test/regress/B21BF389.py index 707ce340..a49c498c 100644 --- a/test/regress/B21BF389.py +++ b/test/regress/B21BF389.py @@ -3,7 +3,11 @@ from __future__ import print_function, unicode_literals +import sys import ledger for post in ledger.read_journal(__file__.replace(".py", "_py.test")).query("income"): - print(unicode(post.tag("Reference"))) + reference = post.tag("Reference") + if sys.version_info.major == 2: + reference = unicode(reference) + print(reference) |