MCPcopy
hub / github.com/pytest-dev/pytest / test_cleanup_locked

Method test_cleanup_locked

testing/test_tmpdir.py:501–511  ·  testing/test_tmpdir.py::TestNumberedDir.test_cleanup_locked
(self, tmp_path)

Source from the content-addressed store, hash-verified

499 assert dir_num == 0
500
501 def test_cleanup_locked(self, tmp_path):
502 p = make_numbered_dir(root=tmp_path, prefix=self.PREFIX)
503
504 create_cleanup_lock(p)
505
506 assert not pathlib.ensure_deletable(
507 p, consider_lock_dead_if_created_before=p.stat().st_mtime - 1
508 )
509 assert pathlib.ensure_deletable(
510 p, consider_lock_dead_if_created_before=p.stat().st_mtime + 1
511 )
512
513 def test_cleanup_ignores_symlink(self, tmp_path):
514 the_symlink = tmp_path / (self.PREFIX + class="st">"current")

Callers

nothing calls this directly

Calls 3

make_numbered_dirFunction · 0.90
create_cleanup_lockFunction · 0.90
statMethod · 0.80

Tested by

no test coverage detected