fname stringlengths 63 176 | rel_fname stringclasses 706
values | line int64 -1 4.5k | name stringlengths 1 81 | kind stringclasses 2
values | category stringclasses 2
values | info stringlengths 0 77.9k ⌀ |
|---|---|---|---|---|---|---|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 207 | joinpath | ref | function | mod1path = tmp_path.joinpath("xxxpackage", "module1.py")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 208 | touch | ref | function | mod1path.touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 209 | import_path | ref | function | mod1 = import_path(mod1path, root=tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 215 | test_check_filepath_consistency | def | function | def test_check_filepath_consistency(
self, monkeypatch: MonkeyPatch, tmp_path: Path
) -> None:
name = "pointsback123"
p = tmp_path.joinpath(name + ".py")
p.touch()
for ending in (".pyc", ".pyo"):
mod = ModuleType(name)
pseudopath = tmp_path.joinpat... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 219 | joinpath | ref | function | p = tmp_path.joinpath(name + ".py")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 220 | touch | ref | function | p.touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 223 | joinpath | ref | function | pseudopath = tmp_path.joinpath(name + ending)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 224 | touch | ref | function | pseudopath.touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 226 | setitem | ref | function | monkeypatch.setitem(sys.modules, name, mod)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 227 | import_path | ref | function | newmod = import_path(p, root=tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 229 | undo | ref | function | monkeypatch.undo()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 231 | joinpath | ref | function | pseudopath = tmp_path.joinpath(name + "123.py")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 232 | touch | ref | function | pseudopath.touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 234 | setitem | ref | function | monkeypatch.setitem(sys.modules, name, mod)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 235 | raises | ref | function | with pytest.raises(ImportPathMismatchError) as excinfo:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 236 | import_path | ref | function | import_path(p, root=tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 243 | test_issue131_on__init__ | def | function | def test_issue131_on__init__(self, tmp_path: Path) -> None:
# __init__.py files may be namespace packages, and thus the
# __file__ of an imported module may not be ourselves
# see issue
tmp_path.joinpath("proja").mkdir()
p1 = tmp_path.joinpath("proja", "__init__.py")
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 247 | joinpath | ref | function | tmp_path.joinpath("proja").mkdir()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 247 | mkdir | ref | function | tmp_path.joinpath("proja").mkdir()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 248 | joinpath | ref | function | p1 = tmp_path.joinpath("proja", "__init__.py")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 249 | touch | ref | function | p1.touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 250 | joinpath | ref | function | tmp_path.joinpath("sub", "proja").mkdir(parents=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 250 | mkdir | ref | function | tmp_path.joinpath("sub", "proja").mkdir(parents=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 251 | joinpath | ref | function | p2 = tmp_path.joinpath("sub", "proja", "__init__.py")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 252 | touch | ref | function | p2.touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 253 | import_path | ref | function | m1 = import_path(p1, root=tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 254 | import_path | ref | function | m2 = import_path(p2, root=tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 257 | test_ensuresyspath_append | def | function | def test_ensuresyspath_append(self, tmp_path: Path) -> None:
root1 = tmp_path / "root1"
root1.mkdir()
file1 = root1 / "x123.py"
file1.touch()
assert str(root1) not in sys.path
import_path(file1, mode="append", root=tmp_path)
assert str(root1) == sys.path[-1]
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 259 | mkdir | ref | function | root1.mkdir()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 261 | touch | ref | function | file1.touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 263 | import_path | ref | function | import_path(file1, mode="append", root=tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 267 | test_invalid_path | def | function | def test_invalid_path(self, tmp_path: Path) -> None:
with pytest.raises(ImportError):
import_path(tmp_path / "invalid.py", root=tmp_path)
@pytest.fixture
def simple_module(self, tmp_path: Path) -> Path:
fn = tmp_path / "_src/tests/mymod.py"
fn.parent.mkdir(parents=_True)... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 268 | raises | ref | function | with pytest.raises(ImportError):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 269 | import_path | ref | function | import_path(tmp_path / "invalid.py", root=tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 272 | simple_module | def | function | def simple_module(self, tmp_path: Path) -> Path:
fn = tmp_path / "_src/tests/mymod.py"
fn.parent.mkdir(parents=_True)
fn.write_text("def foo(x): return 40 + x")
return fn
def test_importmode_importlib(self, simple_module: Path, tmp_path: Path) -> None:
"""`importlib` mod... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 274 | mkdir | ref | function | fn.parent.mkdir(parents=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 275 | write_text | ref | function | fn.write_text("def foo(x): return 40 + x")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 278 | test_importmode_importlib | def | function | def test_importmode_importlib(self, simple_module: Path, tmp_path: Path) -> None:
"""`importlib` mode does not change sys.path."""
module = import_path(simple_module, mode="importlib", root=tmp_path)
assert module.foo(2) == 42 # type: ignore[attr-defined]
assert str(simple_module.pa... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 280 | import_path | ref | function | module = import_path(simple_module, mode="importlib", root=tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 281 | foo | ref | function | assert module.foo(2) == 42 # type: ignore[attr-defined]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 288 | test_importmode_twice_is_different_module | def | function | def test_importmode_twice_is_different_module(
self, simple_module: Path, tmp_path: Path
) -> None:
"""`importlib` mode always returns a new module."""
module1 = import_path(simple_module, mode="importlib", root=tmp_path)
module2 = import_path(simple_module, mode="importlib", roo... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 292 | import_path | ref | function | module1 = import_path(simple_module, mode="importlib", root=tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 293 | import_path | ref | function | module2 = import_path(simple_module, mode="importlib", root=tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 296 | test_no_meta_path_found | def | function | def test_no_meta_path_found(
self, simple_module: Path, monkeypatch: MonkeyPatch, tmp_path: Path
) -> None:
"""Even without any meta_path should still import module."""
monkeypatch.setattr(sys, "meta_path", [])
module = import_path(simple_module, mode="importlib", root=tmp_path)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 301 | import_path | ref | function | module = import_path(simple_module, mode="importlib", root=tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 302 | foo | ref | function | assert module.foo(2) == 42 # type: ignore[attr-defined]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 310 | raises | ref | function | with pytest.raises(ImportError):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 311 | import_path | ref | function | import_path(simple_module, mode="importlib", root=tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 314 | test_resolve_package_path | def | function | def test_resolve_package_path(tmp_path: Path) -> None:
pkg = tmp_path / "pkg1"
pkg.mkdir()
(pkg / "__init__.py").touch()
(pkg / "subdir").mkdir()
(pkg / "subdir/__init__.py").touch()
assert resolve_package_path(pkg) == pkg
assert resolve_package_path(pkg.joinpath("subdir", "__init__.py")) ==... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 316 | mkdir | ref | function | pkg.mkdir()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 317 | touch | ref | function | (pkg / "__init__.py").touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 318 | mkdir | ref | function | (pkg / "subdir").mkdir()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 319 | touch | ref | function | (pkg / "subdir/__init__.py").touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 320 | resolve_package_path | ref | function | assert resolve_package_path(pkg) == pkg
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 321 | resolve_package_path | ref | function | assert resolve_package_path(pkg.joinpath("subdir", "__init__.py")) == pkg
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 321 | joinpath | ref | function | assert resolve_package_path(pkg.joinpath("subdir", "__init__.py")) == pkg
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 324 | test_package_unimportable | def | function | def test_package_unimportable(tmp_path: Path) -> None:
pkg = tmp_path / "pkg1-1"
pkg.mkdir()
pkg.joinpath("__init__.py").touch()
subdir = pkg.joinpath("subdir")
subdir.mkdir()
pkg.joinpath("subdir/__init__.py").touch()
assert resolve_package_path(subdir) == subdir
xyz = subdir.joinpath("... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 326 | mkdir | ref | function | pkg.mkdir()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 327 | joinpath | ref | function | pkg.joinpath("__init__.py").touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 327 | touch | ref | function | pkg.joinpath("__init__.py").touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 328 | joinpath | ref | function | subdir = pkg.joinpath("subdir")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 329 | mkdir | ref | function | subdir.mkdir()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 330 | joinpath | ref | function | pkg.joinpath("subdir/__init__.py").touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 330 | touch | ref | function | pkg.joinpath("subdir/__init__.py").touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 331 | resolve_package_path | ref | function | assert resolve_package_path(subdir) == subdir
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 332 | joinpath | ref | function | xyz = subdir.joinpath("xyz.py")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 333 | touch | ref | function | xyz.touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 334 | resolve_package_path | ref | function | assert resolve_package_path(xyz) == subdir
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 335 | resolve_package_path | ref | function | assert not resolve_package_path(pkg)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 338 | test_access_denied_during_cleanup | def | function | def test_access_denied_during_cleanup(tmp_path: Path, monkeypatch: MonkeyPatch) -> None:
"""Ensure that deleting a numbered dir does not fail because of OSErrors (#4262)."""
path = tmp_path / "temp-1"
path.mkdir()
def renamed_failed(*args):
raise OSError("access denied")
monkeypatch.setatt... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 341 | mkdir | ref | function | path.mkdir()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 343 | renamed_failed | def | function | def renamed_failed(*args):
raise OSError("access denied")
monkeypatch.setattr(Path, "rename", renamed_failed)
lock_path = get_lock_path(path)
maybe_delete_a_numbered_dir(path)
assert not lock_path.is_file()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 348 | get_lock_path | ref | function | lock_path = get_lock_path(path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 349 | maybe_delete_a_numbered_dir | ref | function | maybe_delete_a_numbered_dir(path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 350 | is_file | ref | function | assert not lock_path.is_file()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 353 | test_long_path_during_cleanup | def | function | def test_long_path_during_cleanup(tmp_path: Path) -> None:
"""Ensure that deleting long path works (particularly on Windows (#6775))."""
path = (tmp_path / ("a" * 250)).resolve()
if sys.platform == "win32":
# make sure that the full path is > 260 characters without any
# component being over... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 355 | resolve | ref | function | path = (tmp_path / ("a" * 250)).resolve()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 363 | mkdir | ref | function | os.mkdir(extended_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 365 | maybe_delete_a_numbered_dir | ref | function | maybe_delete_a_numbered_dir(path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 369 | test_get_extended_length_path_str | def | function | def test_get_extended_length_path_str() -> None:
assert get_extended_length_path_str(r"c:\foo") == r"\\?\c:\foo"
assert get_extended_length_path_str(r"\\share\foo") == r"\\?\UNC\share\foo"
assert get_extended_length_path_str(r"\\?\UNC\share\foo") == r"\\?\UNC\share\foo"
assert get_extended_length_path_s... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 370 | get_extended_length_path_str | ref | function | assert get_extended_length_path_str(r"c:\foo") == r"\\?\c:\foo"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 371 | get_extended_length_path_str | ref | function | assert get_extended_length_path_str(r"\\share\foo") == r"\\?\UNC\share\foo"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 372 | get_extended_length_path_str | ref | function | assert get_extended_length_path_str(r"\\?\UNC\share\foo") == r"\\?\UNC\share\foo"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 373 | get_extended_length_path_str | ref | function | assert get_extended_length_path_str(r"\\?\c:\foo") == r"\\?\c:\foo"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 376 | test_suppress_error_removing_lock | def | function | def test_suppress_error_removing_lock(tmp_path: Path) -> None:
"""ensure_deletable should be resilient if lock file cannot be removed (#5456, #7491)"""
path = tmp_path / "dir"
path.mkdir()
lock = get_lock_path(path)
lock.touch()
mtime = lock.stat().st_mtime
with unittest.mock.patch.object(P... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 379 | mkdir | ref | function | path.mkdir()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 380 | get_lock_path | ref | function | lock = get_lock_path(path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 381 | touch | ref | function | lock.touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 382 | stat | ref | function | mtime = lock.stat().st_mtime
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 385 | ensure_deletable | ref | function | assert not ensure_deletable(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 389 | is_file | ref | function | assert lock.is_file()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 392 | ensure_deletable | ref | function | assert not ensure_deletable(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 396 | is_file | ref | function | assert lock.is_file()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 399 | ensure_deletable | ref | function | assert ensure_deletable(path, consider_lock_dead_if_created_before=mtime + 30)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 400 | is_file | ref | function | assert not lock.is_file()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 403 | test_bestrelpath | def | function | def test_bestrelpath() -> None:
curdir = Path("/foo/bar/baz/path")
assert bestrelpath(curdir, curdir) == "."
assert bestrelpath(curdir, curdir / "hello" / "world") == "hello" + os.sep + "world"
assert bestrelpath(curdir, curdir.parent / "sister") == ".." + os.sep + "sister"
assert bestrelpath(curdir... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 404 | Path | ref | function | curdir = Path("/foo/bar/baz/path")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 405 | bestrelpath | ref | function | assert bestrelpath(curdir, curdir) == "."
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 406 | bestrelpath | ref | function | assert bestrelpath(curdir, curdir / "hello" / "world") == "hello" + os.sep + "world"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 407 | bestrelpath | ref | function | assert bestrelpath(curdir, curdir.parent / "sister") == ".." + os.sep + "sister"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.