def load_command_cache():
    load_builtins()
    if ON_WINDOWS:
        for key in ("cd", "bash"):
            builtins.aliases[key] = lambda *args, **kwargs: None
    yield
    unload_builtins()
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
Exemple #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()
Exemple #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()
Exemple #5
0
 def __del__(self):
     if self.unload:
         unload_builtins()
Exemple #6
0
def teardown_module():
    if LOADED_HERE:
        unload_builtins()
Exemple #7
0
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
Exemple #8
0
 def __del__(self):
     if self.unload:
         unload_builtins()
Exemple #9
0
def teardown():
    if LOADED_HERE:
        unload_builtins()
Exemple #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
Exemple #11
0
def teardown():
    if LOADED_HERE:
        unload_builtins()
Exemple #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()
Exemple #13
0
 def __del__(self):
     unload_builtins()
Exemple #14
0
def imp_env():
    execer = Execer(unload=False)
    builtins.__xonsh_env__ = Env({'PATH': [], 'PATHEXT': []})
    yield
    unload_builtins()
Exemple #15
0
def imp_env(xonsh_builtins):
    Execer(unload=False)
    builtins.__xonsh__.env = Env({"PATH": [], "PATHEXT": []})
    yield
    unload_builtins()
Exemple #16
0
def imp_env():
    execer = Execer(unload=False)
    builtins.__xonsh__.env = Env({"PATH": [], "PATHEXT": []})
    yield
    unload_builtins()