diff --git a/tests/test_other.py b/tests/test_other.py index 743607c9a3ca3..384772da00527 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -3204,14 +3204,14 @@ def test_on_abort(self): expectedOutput = "Module['onAbort'] was called" + # trigger onAbort by intentionally causing startup to fail os.remove('a.out.wasm') + f = open('a.out.js', 'a') f.write("Module['onAbort'] = function () { console.log('%s') }" % expectedOutput) f.close() - devnull = open(os.devnull, 'w') - self.assertContained(expectedOutput, run_js('a.out.js', stderr=devnull)) - devnull.close() + self.assertContained(expectedOutput, run_js('a.out.js') def test_no_exit_runtime(self): open('code.cpp', 'w').write(r'''