aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-07-03 20:55:24 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-07-03 20:55:24 -0700
commit73792117e87482077a95c472b254c8b51719bcfd (patch)
treee81d6bfa6d0dba421b1a3ef7d602f70ee442d5e0 /test
parent5344fd51d25960dee6ef9f639bbccffd4fa4b3ed (diff)
Force utf-8 output for `spec_test.py --dump-tests`.
Closes #344.
Diffstat (limited to 'test')
-rwxr-xr-xtest/spec_tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/spec_tests.py b/test/spec_tests.py
index be11f12..392049d 100755
--- a/test/spec_tests.py
+++ b/test/spec_tests.py
@@ -124,7 +124,7 @@ if __name__ == "__main__":
pattern_re = re.compile('.')
tests = [ test for test in all_tests if re.search(pattern_re, test['section']) and (not args.number or test['example'] == args.number) ]
if args.dump_tests:
- print(json.dumps(tests, ensure_ascii=False, indent=2))
+ sys.stdout.buffer.write(json.dumps(tests, ensure_ascii=False, indent=2).encode('utf-8'))
exit(0)
else:
skipped = len(all_tests) - len(tests)