Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Sep 26, 2018
1 parent ff33def commit a1b94fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/_pytest/tmpdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ def find_prefixed(root, prefix):
yield x


def extract_suffixees(iter, prefix):
def extract_suffixes(iter, prefix):
p_len = len(prefix)
for p in iter:
yield p.name[p_len:]


def find_suffixes(root, prefix):
return extract_suffixees(find_prefixed(root, prefix), prefix)
return extract_suffixes(find_prefixed(root, prefix), prefix)


def parse_num(maybe_num):
Expand Down Expand Up @@ -111,7 +111,7 @@ def cleanup_on_exit(lock_path=lock_path, original_pid=pid):
return register(cleanup_on_exit)


def delete_a_numbered_dir(path):
def delete_a_numbered_dir(path, consider_lock_dead_after):
create_cleanup_lock(path)
parent = path.parent

Expand All @@ -131,10 +131,10 @@ def cleanup_numbered_dir(root, prefix, keep, consider_lock_dead_after):
max_delete = max_existing - keep
paths = find_prefixed(root, prefix)
paths, paths2 = itertools.tee(paths)
numbers = map(parse_num, extract_suffixees(paths2, prefix))
numbers = map(parse_num, extract_suffixes(paths2, prefix))
for path, number in zip(paths, numbers):
if number <= max_delete and is_deletable(path, consider_lock_dead_after):
delete_a_numbered_dir(path)
delete_a_numbered_dir(path, consider_lock_dead_after)


def make_numbered_dir_with_cleanup(root, prefix, keep, consider_lock_dead_after):
Expand Down

0 comments on commit a1b94fb

Please sign in to comment.