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')"
def run_replay(re_file): with swap(builtins, '__xonsh_shell__', SHELL): r = Replayer(re_file) hist = r.replay() return hist
def test_reecho(): histfile = os.path.join(HISTDIR, 'echo.json') hist = Replayer(histfile).replay() assert len(hist) == 2
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