Did I find the right examples for you? yes no

All Samples(24)  |  Call(12)  |  Derive(0)  |  Import(12)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/driver.py   plexnet(Download)
    def task_compile_cli(self):
        from pypy.translator.oosupport.support import unpatch_os
        from pypy.translator.cli.test.runtest import CliFunctionWrapper
        filename = self.gen.build_exe()
        self.c_entryp = CliFunctionWrapper(filename)
        # restore original os values
        if hasattr(self, 'old_cli_defs'):
            unpatch_os(self.old_cli_defs)
    def task_compile_jvm(self):
        from pypy.translator.oosupport.support import unpatch_os
        from pypy.translator.jvm.test.runtest import JvmGeneratedSourceWrapper
        self.jvmsource.compile()
        self.c_entryp = JvmGeneratedSourceWrapper(self.jvmsource)
        # restore original os values
        if hasattr(self, 'old_cli_defs'):
            unpatch_os(self.old_cli_defs)

src/s/y/Sypy-HEAD/translator/driver.py   Sypy(Download)
    def task_compile_cli(self):
        from pypy.translator.oosupport.support import unpatch_os
        from pypy.translator.cli.test.runtest import CliFunctionWrapper
        filename = self.gen.build_exe()
        self.c_entryp = CliFunctionWrapper(filename)
        # restore original os values
        if hasattr(self, 'old_cli_defs'):
            unpatch_os(self.old_cli_defs)
    def task_compile_jvm(self):
        from pypy.translator.oosupport.support import unpatch_os
        from pypy.translator.jvm.test.runtest import JvmGeneratedSourceWrapper
        self.jvmsource.compile()
        self.c_entryp = JvmGeneratedSourceWrapper(self.jvmsource)
        # restore original os values
        if hasattr(self, 'old_cli_defs'):
            unpatch_os(self.old_cli_defs)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/oosupport/test_template/runtest.py   plexnet(Download)
    def test_patch_os(self):
        import os
        from pypy.translator.oosupport.support import patch_os, unpatch_os, NT_OS
        original_O_CREAT = os.O_CREAT
        olddefs = patch_os()
        assert os.O_CREAT == NT_OS['O_CREAT']
        unpatch_os(olddefs)

src/s/y/Sypy-HEAD/translator/oosupport/test_template/runtest.py   Sypy(Download)
    def test_patch_os(self):
        import os
        from pypy.translator.oosupport.support import patch_os, unpatch_os, NT_OS
        original_O_CREAT = os.O_CREAT
        olddefs = patch_os()
        assert os.O_CREAT == NT_OS['O_CREAT']
        unpatch_os(olddefs)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/test/support.py   plexnet(Download)
    def post_translation_hook(self):
        from pypy.translator.oosupport.support import unpatch_os
        unpatch_os(self.olddefs) # restore original values
 
    def _compile_and_run(self, t, entry_point, entry_point_graph, args):

src/s/y/Sypy-HEAD/jit/backend/test/support.py   Sypy(Download)
    def post_translation_hook(self):
        from pypy.translator.oosupport.support import unpatch_os
        unpatch_os(self.olddefs) # restore original values
 
    def _compile_and_run(self, t, entry_point, entry_point_graph, args):

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/jvm/test/runtest.py   plexnet(Download)
from pypy.annotation.model import lltype_to_annotation
from pypy.translator.translator import TranslationContext
from pypy.translator.oosupport.support import patch_os, unpatch_os
from pypy.translator.jvm.genjvm import \
     generate_source_for_function, JvmError, detect_missing_support_programs
            olddefs = patch_os()
            self._jvm_src = generate_source_for_function(fn, ann, backendopt)
            unpatch_os(olddefs)
            if not getoption('noasm'):
                self._jvm_src.compile()

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/cli/test/runtest.py   plexnet(Download)
from pypy.translator.cli.sdk import SDK
from pypy.translator.cli.entrypoint import BaseEntryPoint
from pypy.translator.oosupport.support import patch_os, unpatch_os
 
 
    gen.generate_source()
    exe_name = gen.build_exe()
    unpatch_os(olddefs) # restore original values
    return CliFunctionWrapper(exe_name, func.__name__, auto_raise_exc)
 

src/s/y/Sypy-HEAD/translator/jvm/test/runtest.py   Sypy(Download)
from pypy.annotation.model import lltype_to_annotation
from pypy.translator.translator import TranslationContext
from pypy.translator.oosupport.support import patch_os, unpatch_os
from pypy.translator.jvm.genjvm import \
     generate_source_for_function, JvmError, detect_missing_support_programs
            olddefs = patch_os()
            self._jvm_src = generate_source_for_function(fn, ann, backendopt)
            unpatch_os(olddefs)
            if not getoption('noasm'):
                self._jvm_src.compile()

src/s/y/Sypy-HEAD/translator/cli/test/runtest.py   Sypy(Download)
from pypy.translator.cli.sdk import SDK
from pypy.translator.cli.entrypoint import BaseEntryPoint
from pypy.translator.oosupport.support import patch_os, unpatch_os
 
 
    gen.generate_source()
    exe_name = gen.build_exe()
    unpatch_os(olddefs) # restore original values
    return CliFunctionWrapper(exe_name, func.__name__, auto_raise_exc)