diff options
author | ipknHama <ipknhama@gmail.com> | 2014-08-07 04:46:28 +0900 |
---|---|---|
committer | ipknHama <ipknhama@gmail.com> | 2014-08-07 04:46:28 +0900 |
commit | e70380e003ae28822a6b903193c9a699cc02c405 (patch) | |
tree | 529a655ab16dc121024723d820edcfd192d381b5 /tests/template/test.py | |
parent | 031615ac866cc3c8f1900dd4b4aae2106ad31230 (diff) | |
download | crow-e70380e003ae28822a6b903193c9a699cc02c405.tar.gz crow-e70380e003ae28822a6b903193c9a699cc02c405.zip |
cmake update, added template test
Diffstat (limited to 'tests/template/test.py')
-rwxr-xr-x | tests/template/test.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/template/test.py b/tests/template/test.py index 22fcca0..57bcaf8 100755 --- a/tests/template/test.py +++ b/tests/template/test.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import print_function import glob import json import os @@ -14,15 +15,15 @@ for testfile in glob.glob("*.json"): open('partials', 'w').write(json.dumps(test["partials"])) else: open('partials', 'w').write("{}") - ret = subprocess.check_output("./mustachetest") - print testfile, test["name"] + ret = subprocess.check_output("./mustachetest").decode('utf8') + print(testfile, test["name"]) if ret != test["expected"]: if 'partials' in test: - print 'partials:', json.dumps(test["partials"]) - print json.dumps(test["data"]) - print test["template"] - print 'Expected:',repr(test["expected"]) - print 'Actual:',repr(ret) + print('partials:', json.dumps(test["partials"])) + print(json.dumps(test["data"])) + print(test["template"]) + print('Expected:',repr(test["expected"])) + print('Actual:',repr(ret)) assert ret == test["expected"] os.unlink('data') os.unlink('template') |