diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-07-03 20:55:24 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-07-03 20:55:24 -0700 |
commit | 73792117e87482077a95c472b254c8b51719bcfd (patch) | |
tree | e81d6bfa6d0dba421b1a3ef7d602f70ee442d5e0 /test | |
parent | 5344fd51d25960dee6ef9f639bbccffd4fa4b3ed (diff) |
Force utf-8 output for `spec_test.py --dump-tests`.
Closes #344.
Diffstat (limited to 'test')
-rwxr-xr-x | test/spec_tests.py | 2 |
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) |