예제 #1
0
    def _run_program(self, path, program, allow_error=False):
        bindings = injection.create_bindings()
        if hasattr(self, "create_bindings"):
            self.create_bindings(bindings)
        injector = zuice.Injector(bindings)
        platform = injector.get(self.platform)

        with testing.compiled(platform, path, program) as output:
            return self._run(platform, output.cwd, output.main, allow_error)
예제 #2
0
def _node_js_platform(optimise):
    bindings = injection.create_bindings()
    bindings.bind(nodejs.optimise).to_instance(optimise)
    return zuice.Injector(bindings).get(NodeJs)