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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 327 | joinpath | ref | function | pkg.joinpath("__init__.py").touch()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 327 | touch | ref | function | pkg.joinpath("__init__.py").touch()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 328 | joinpath | ref | function | subdir = pkg.joinpath("subdir")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 329 | mkdir | ref | function | subdir.mkdir()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 330 | joinpath | ref | function | pkg.joinpath("subdir/__init__.py").touch()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 330 | touch | ref | function | pkg.joinpath("subdir/__init__.py").touch()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 331 | resolve_package_path | ref | function | assert resolve_package_path(subdir) == subdir
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 332 | joinpath | ref | function | xyz = subdir.joinpath("xyz.py")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 333 | touch | ref | function | xyz.touch()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 334 | resolve_package_path | ref | function | assert resolve_package_path(xyz) == subdir
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 335 | resolve_package_path | ref | function | assert not resolve_package_path(pkg)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 341 | mkdir | ref | function | path.mkdir()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 348 | get_lock_path | ref | function | lock_path = get_lock_path(path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 349 | maybe_delete_a_numbered_dir | ref | function | maybe_delete_a_numbered_dir(path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 350 | is_file | ref | function | assert not lock_path.is_file()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 355 | resolve | ref | function | path = (tmp_path / ("a" * 250)).resolve()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 363 | mkdir | ref | function | os.mkdir(extended_path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 365 | maybe_delete_a_numbered_dir | ref | function | maybe_delete_a_numbered_dir(path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 379 | mkdir | ref | function | path.mkdir()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 380 | get_lock_path | ref | function | lock = get_lock_path(path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 381 | touch | ref | function | lock.touch()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 382 | stat | ref | function | mtime = lock.stat().st_mtime
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 385 | ensure_deletable | ref | function | assert not ensure_deletable(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 389 | is_file | ref | function | assert lock.is_file()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 392 | ensure_deletable | ref | function | assert not ensure_deletable(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 396 | is_file | ref | function | assert lock.is_file()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 400 | is_file | ref | function | assert not lock.is_file()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 404 | Path | ref | function | curdir = Path("/foo/bar/baz/path")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 405 | bestrelpath | ref | function | assert bestrelpath(curdir, curdir) == "."
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 406 | bestrelpath | ref | function | assert bestrelpath(curdir, curdir / "hello" / "world") == "hello" + os.sep + "world"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 407 | bestrelpath | ref | function | assert bestrelpath(curdir, curdir.parent / "sister") == ".." + os.sep + "sister"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 408 | bestrelpath | ref | function | assert bestrelpath(curdir, curdir.parent) == ".."
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 409 | bestrelpath | ref | function | assert bestrelpath(curdir, Path("hello")) == "hello"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 409 | Path | ref | function | assert bestrelpath(curdir, Path("hello")) == "hello"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 412 | test_commonpath | def | function | def test_commonpath() -> None:
path = Path("/foo/bar/baz/path")
subpath = path / "sampledir"
assert commonpath(path, subpath) == path
assert commonpath(subpath, path) == path
assert commonpath(Path(str(path) + "suffix"), path) == path.parent
assert commonpath(path, path.parent.parent) == path.pa... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 413 | Path | ref | function | path = Path("/foo/bar/baz/path")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 417 | Path | ref | function | assert commonpath(Path(str(path) + "suffix"), path) == path.parent
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 421 | test_visit_ignores_errors | def | function | def test_visit_ignores_errors(tmp_path: Path) -> None:
symlink_or_skip("recursive", tmp_path / "recursive")
tmp_path.joinpath("foo").write_bytes(b"")
tmp_path.joinpath("bar").write_bytes(b"")
assert [
entry.name for entry in visit(str(tmp_path), recurse=lambda entry: _False)
] == ["bar", "f... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 422 | symlink_or_skip | ref | function | symlink_or_skip("recursive", tmp_path / "recursive")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 423 | joinpath | ref | function | tmp_path.joinpath("foo").write_bytes(b"")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 423 | write_bytes | ref | function | tmp_path.joinpath("foo").write_bytes(b"")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 424 | joinpath | ref | function | tmp_path.joinpath("bar").write_bytes(b"")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 424 | write_bytes | ref | function | tmp_path.joinpath("bar").write_bytes(b"")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 427 | visit | ref | function | entry.name for entry in visit(str(tmp_path), recurse=lambda entry: False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 431 | skipif | ref | function | @pytest.mark.skipif(not sys.platform.startswith("win"), reason="Windows only")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 432 | test_samefile_false_negatives | def | function | def test_samefile_false_negatives(tmp_path: Path, monkeypatch: MonkeyPatch) -> None:
"""
import_file() should not raise ImportPathMismatchError if the paths are exactly
equal on Windows. It seems directories mounted as UNC paths make os.path.samefile
return _False, even when they are clearly equal.
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 438 | joinpath | ref | function | module_path = tmp_path.joinpath("my_module.py")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 439 | write_text | ref | function | module_path.write_text("def foo(): return 42")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 440 | syspath_prepend | ref | function | monkeypatch.syspath_prepend(tmp_path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 442 | context | ref | function | with monkeypatch.context() as mp:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 447 | import_path | ref | function | module = import_path(module_path, root=tmp_path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 451 | TestImportLibMode | def | class | test_importmode_importlib_with_dataclass test_importmode_importlib_with_pickle test_importmode_importlib_with_pickle_separate_modules test_module_name_from_path test_insert_missing_modules |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 452 | skipif | ref | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 453 | test_importmode_importlib_with_dataclass | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 455 | joinpath | ref | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 456 | mkdir | ref | function | fn.parent.mkdir(parents=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 457 | write_text | ref | function | fn.write_text(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 469 | import_path | ref | function | module = import_path(fn, mode="importlib", root=tmp_path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 471 | Data | ref | function | data = Data(value="foo")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 475 | test_importmode_importlib_with_pickle | def | function | def test_importmode_importlib_with_pickle(self, tmp_path: Path) -> None:
"""Ensure that importlib mode works with pickle (#7859)."""
fn = tmp_path.joinpath("_src/tests/test_pickle.py")
fn.parent.mkdir(parents=_True)
fn.write_text(
dedent(
"""
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 477 | joinpath | ref | function | fn = tmp_path.joinpath("_src/tests/test_pickle.py")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 478 | mkdir | ref | function | fn.parent.mkdir(parents=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 479 | write_text | ref | function | fn.write_text(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 494 | import_path | ref | function | module = import_path(fn, mode="importlib", root=tmp_path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 496 | round_trip | ref | function | action = round_trip()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 497 | action | ref | function | assert action() == 42
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 499 | test_importmode_importlib_with_pickle_separate_modules | def | function | def test_importmode_importlib_with_pickle_separate_modules(
self, tmp_path: Path
) -> None:
"""
Ensure that importlib mode works can load pickles that look similar but are
defined in separate modules.
"""
fn1 = tmp_path.joinpath("_src/m1/tests/test.py")
fn... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 506 | joinpath | ref | function | fn1 = tmp_path.joinpath("_src/m1/tests/test.py")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 507 | mkdir | ref | function | fn1.parent.mkdir(parents=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 508 | write_text | ref | function | fn1.write_text(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 521 | joinpath | ref | function | fn2 = tmp_path.joinpath("_src/m2/tests/test.py")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 522 | mkdir | ref | function | fn2.parent.mkdir(parents=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 523 | write_text | ref | function | fn2.write_text(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 538 | round_trip | def | function | def round_trip(obj):
s = pickle.dumps(obj)
return pickle.loads(s)
module = import_path(fn1, mode="importlib", root=tmp_path)
Data1 = getattr(module, "Data")
module = import_path(fn2, mode="importlib", root=tmp_path)
Data2 = getattr(module, "Data")
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 542 | import_path | ref | function | module = import_path(fn1, mode="importlib", root=tmp_path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 545 | import_path | ref | function | module = import_path(fn2, mode="importlib", root=tmp_path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 548 | round_trip | ref | function | assert round_trip(Data1(20)) == Data1(20)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 548 | Data1 | ref | function | assert round_trip(Data1(20)) == Data1(20)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 548 | Data1 | ref | function | assert round_trip(Data1(20)) == Data1(20)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 549 | round_trip | ref | function | assert round_trip(Data2("hello")) == Data2("hello")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 549 | Data2 | ref | function | assert round_trip(Data2("hello")) == Data2("hello")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 549 | Data2 | ref | function | assert round_trip(Data2("hello")) == Data2("hello")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 553 | test_module_name_from_path | def | function | def test_module_name_from_path(self, tmp_path: Path) -> None:
result = module_name_from_path(tmp_path / "src/tests/test_foo.py", tmp_path)
assert result == "src.tests.test_foo"
# Path is not relative to root dir: use the full path to obtain the module name.
result = module_name_from... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 554 | module_name_from_path | ref | function | result = module_name_from_path(tmp_path / "src/tests/test_foo.py", tmp_path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 558 | module_name_from_path | ref | function | result = module_name_from_path(Path("/home/foo/test_foo.py"), Path("/bar"))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 558 | Path | ref | function | result = module_name_from_path(Path("/home/foo/test_foo.py"), Path("/bar"))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 558 | Path | ref | function | result = module_name_from_path(Path("/home/foo/test_foo.py"), Path("/bar"))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 561 | test_insert_missing_modules | def | function | def test_insert_missing_modules(self) -> None:
modules = {"src.tests.foo": ModuleType("src.tests.foo")}
insert_missing_modules(modules, "src.tests.foo")
assert sorted(modules) == ["src", "src.tests", "src.tests.foo"]
mod = ModuleType("mod", doc="My Module")
modules = {"src":... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pathlib.py | testing/test_pathlib.py | 563 | insert_missing_modules | ref | function | insert_missing_modules(modules, "src.tests.foo")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.