예제 #1
0
def load_command_cache():
    load_builtins()
    if ON_WINDOWS:
        for key in ("cd", "bash"):
            builtins.aliases[key] = lambda *args, **kwargs: None
    yield
    unload_builtins()
예제 #2
0
def load_command_cache(xonsh_builtins):
    gc.collect()
    unload_builtins()
    load_builtins()
    if ON_WINDOWS:
        for key in ("cd", "bash"):
            builtins.aliases[key] = lambda *args, **kwargs: None
예제 #3
0
def load_command_cache():
    load_builtins()
    if ON_WINDOWS:
        for key in ('cd', 'bash'):
            builtins.aliases[key] = lambda *args, **kwargs: None
    yield
    unload_builtins()
예제 #4
0
def load_command_cache(xonsh_builtins):
    load_builtins()
    if ON_WINDOWS:
        for key in ("cd", "bash"):
            builtins.aliases[key] = lambda *args, **kwargs: None
    yield
    unload_builtins()
예제 #5
0
파일: execer.py 프로젝트: DNSGeek/xonsh
 def __del__(self):
     if self.unload:
         unload_builtins()
예제 #6
0
파일: test_imphooks.py 프로젝트: dgsb/xonsh
def teardown_module():
    if LOADED_HERE:
        unload_builtins()
예제 #7
0
파일: test_imphooks.py 프로젝트: dgsb/xonsh
def setup_module():
    global LOADED_HERE
    if built_ins.BUILTINS_LOADED:
        unload_builtins()  # make sure we have a clean env from other tests.
        load_builtins(execer=Execer())
        LOADED_HERE = True
예제 #8
0
파일: execer.py 프로젝트: wshanks/xonsh
 def __del__(self):
     if self.unload:
         unload_builtins()
예제 #9
0
def teardown():
    if LOADED_HERE:
        unload_builtins()
예제 #10
0
def setup():
    global LOADED_HERE
    if built_ins.BUILTINS_LOADED:
        unload_builtins()  # make sure we have a clean env from other tests.
        load_builtins(execer=Execer())
        LOADED_HERE = True
예제 #11
0
def teardown():
    if LOADED_HERE:
        unload_builtins()
예제 #12
0
def imp_env(xonsh_execer):
    """Call `load_builtins` with `xonsh_execer`"""
    load_builtins(execer=xonsh_execer)
    builtins.__xonsh_env__ = Env({'PATH': [], 'PATHEXT': []})
    yield
    unload_builtins()
예제 #13
0
파일: execer.py 프로젝트: abadger/xonsh
 def __del__(self):
     unload_builtins()
예제 #14
0
def imp_env():
    execer = Execer(unload=False)
    builtins.__xonsh_env__ = Env({'PATH': [], 'PATHEXT': []})
    yield
    unload_builtins()
예제 #15
0
def imp_env(xonsh_builtins):
    Execer(unload=False)
    builtins.__xonsh__.env = Env({"PATH": [], "PATHEXT": []})
    yield
    unload_builtins()
예제 #16
0
def imp_env():
    execer = Execer(unload=False)
    builtins.__xonsh__.env = Env({"PATH": [], "PATHEXT": []})
    yield
    unload_builtins()