def test_try_rmdir__missing(temp_folder): fpath = os.path.join(temp_folder, "testdir") assert not try_rmdir(fpath) assert not os.path.exists(fpath)
def test_try_rmdir(temp_folder): fpath = os.path.join(temp_folder, "testdir") os.mkdir(fpath) assert try_rmdir(fpath) assert not os.path.exists(fpath)