Esempio n. 1
0
def test_chdir_double_undo(mp: MonkeyPatch, tmpdir: py.path.local) -> None:
    mp.chdir(tmpdir.strpath)
    mp.undo()
    tmpdir.chdir()
    mp.undo()
    assert os.getcwd() == tmpdir.strpath
Esempio n. 2
0
def recipes_folder(tmpdir: py.path.local):
    """Prepares a temp dir with '/recipes' folder as configured"""
    orig_cwd = tmpdir.chdir()
    yield tmpdir.mkdir(TEST_RECIPES_FOLDER)
    orig_cwd.chdir()