def test_postrun_exception(self):
    self.add_post_run('ThisFunctionDoesNotExist()')
    src = open(path_from_root('tests', 'core', 'test_hello_world.c')).read()
    self.build(src, self.get_dir(), 'src.c')
    output = run_js('src.c.o.js', assert_returncode=None, stderr=STDOUT)
    self.assertNotContained('failed to asynchronously prepare wasm', output)
    self.assertContained('hello, world!', output)
    self.assertContained('ThisFunctionDoesNotExist is not defined', output)
def test_postrun_exception(self):
    self.add_post_run('ThisFunctionDoesNotExist()')
    src = open(path_from_root('tests', 'core', 'test_hello_world.c')).read()
    self.build(src, self.get_dir(), 'src.c')
    output = run_js('src.c.o.js', assert_returncode=None, stderr=STDOUT)
    self.assertNotContained('failed to asynchronously prepare wasm', output)
    self.assertContained('hello, world!', output)
    self.assertContained('ThisFunctionDoesNotExist is not defined', output)