From cbcca4cf42690514c04fce958675dcc05c1e86e3 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 31 Jul 2019 17:41:06 -0700 Subject: Python3-ify check.py and auto_update_tests.py (#2270) I fixed flatten.bin.txt which seems to have just had some corrupted data, and I removed some fancy unicode from the spec comments tests, which I'm not sure it's important enough to figure out how to fix. Fixes #1691 --- test/unit/utils.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/unit/utils.py') diff --git a/test/unit/utils.py b/test/unit/utils.py index 876f2f4ec..6b18235b5 100644 --- a/test/unit/utils.py +++ b/test/unit/utils.py @@ -9,12 +9,11 @@ class BinaryenTestCase(unittest.TestCase): def roundtrip(self, filename, opts=[]): path = self.input_path(filename) - p = run_process(WASM_OPT + ['-g', '-o', '-', path] + opts, check=False, - capture_output=True) + p = run_process(WASM_OPT + ['-g', '-o', 'a.wasm', path] + opts) self.assertEqual(p.returncode, 0) - self.assertEqual(p.stderr, '') with open(path, 'rb') as f: - self.assertEqual(str(p.stdout), str(f.read())) + with open('a.wasm', 'rb') as g: + self.assertEqual(g.read(), f.read()) def disassemble(self, filename): path = self.input_path(filename) -- cgit v1.2.3