Beispiel #1
0
def test_simple_python():
    histfile = os.path.join(HISTDIR, 'simple-python.json')
    hist = Replayer(histfile).replay()
    assert len(hist) == 4
    assert hist.inps[0].strip() == "print('The Turtles')"
Beispiel #2
0
def run_replay(re_file):
    with swap(builtins, '__xonsh_shell__', SHELL):
        r = Replayer(re_file)
        hist = r.replay()
    return hist
Beispiel #3
0
def test_reecho():
    histfile = os.path.join(HISTDIR, 'echo.json')
    hist = Replayer(histfile).replay()
    assert len(hist) == 2
Beispiel #4
0
def run_replay(re_file):
    with swap(builtins, '__xonsh_shell__', SHELL):
        with swap(builtins, '__xonsh_exit__', False):
            r = Replayer(re_file)
            hist = r.replay()
    return hist