def test_adjacent_directory_exists(self, name, tmpdir): block_name, expect_name = itertools.islice( AdjacentTempDirectory._generate_names(name), 2) original = os.path.join(tmpdir, name) blocker = os.path.join(tmpdir, block_name) ensure_dir(original) ensure_dir(blocker) with AdjacentTempDirectory(original) as atmp_dir: assert expect_name == os.path.split(atmp_dir.path)[1]
def names(): return AdjacentTempDirectory._generate_names(name)
def names() -> Iterator[str]: return AdjacentTempDirectory._generate_names(name)