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_assertrewrite.py | testing/test_assertrewrite.py | 1,612 | _get_assertion_exprs | ref | function | assert _get_assertion_exprs(src) == expected
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,615 | test_try_makedirs | def | function | def test_try_makedirs(monkeypatch, tmp_path: Path) -> None:
from _pytest.assertion.rewrite import try_makedirs
p = tmp_path / "foo"
# create
assert try_makedirs(p)
assert p.is_dir()
# already exist
assert try_makedirs(p)
# monkeypatch to simulate all error situations
def fake_mkd... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,621 | try_makedirs | ref | function | assert try_makedirs(p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,625 | try_makedirs | ref | function | assert try_makedirs(p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,628 | fake_mkdir | def | function | null |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,633 | try_makedirs | ref | function | assert not try_makedirs(p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,636 | try_makedirs | ref | function | assert not try_makedirs(p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,639 | try_makedirs | ref | function | assert not try_makedirs(p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,644 | try_makedirs | ref | function | assert not try_makedirs(p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,650 | raises | ref | function | with pytest.raises(OSError) as exc_info:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,651 | try_makedirs | ref | function | try_makedirs(p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,655 | TestPyCacheDir | def | class | test_get_cache_dir test_sys_pycache_prefix_integration |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,656 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,665 | test_get_cache_dir | def | function | def test_get_cache_dir(self, monkeypatch, prefix, source, expected) -> None:
monkeypatch.delenv("PYTHONPYCACHEPREFIX", raising=_False)
if prefix is not None and sys.version_info < (3, 8):
pytest.skip("pycache_prefix not available in py<38")
monkeypatch.setattr(sys, "pycache_pref... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,666 | delenv | ref | function | monkeypatch.delenv("PYTHONPYCACHEPREFIX", raising=False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,669 | skip | ref | function | pytest.skip("pycache_prefix not available in py<38")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,672 | get_cache_dir | ref | function | assert get_cache_dir(Path(source)) == Path(expected)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,674 | skipif | ref | function | @pytest.mark.skipif(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,677 | test_sys_pycache_prefix_integration | def | function | def test_sys_pycache_prefix_integration(
self, tmp_path, monkeypatch, pytester: Pytester
) -> None:
"""Integration test for sys.pycache_prefix (#4730)."""
pycache_prefix = tmp_path / "my/pycs"
monkeypatch.setattr(sys, "pycache_prefix", str(pycache_prefix))
monkeypatch.set... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,685 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,695 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,704 | get_cache_dir | ref | function | test_foo_pyc = get_cache_dir(test_foo) / ("test_foo" + PYC_TAIL)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,708 | get_cache_dir | ref | function | bar_init_pyc = get_cache_dir(bar_init) / "__init__.{cache_tag}.pyc".format(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,714 | TestReprSizeVerbosity | def | class | test_get_maxsize_for_saferepr create_test_file test_default_verbosity test_increased_verbosity test_max_increased_verbosity |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,720 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,729 | test_get_maxsize_for_saferepr | def | function | def test_get_maxsize_for_saferepr(self, verbose: int, expected_size) -> None:
class FakeConfig:
def getoption(self, name: str) -> int:
assert name == "verbose"
return verbose
config = FakeConfig()
assert _get_maxsize_for_saferepr(cast(Config, conf... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,730 | FakeConfig | def | class | getoption |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,731 | getoption | def | function | def getoption(self, name: str) -> int:
assert name == "verbose"
return verbose
config = FakeConfig()
assert _get_maxsize_for_saferepr(cast(Config, config)) == expected_size
def create_test_file(self, pytester: Pytester, size: int) -> None:
pytest... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,735 | FakeConfig | ref | function | config = FakeConfig()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,736 | _get_maxsize_for_saferepr | ref | function | assert _get_maxsize_for_saferepr(cast(Config, config)) == expected_size
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,738 | create_test_file | def | function | def create_test_file(self, pytester: Pytester, size: int) -> None:
pytester.makepyfile(
f"""
def test_very_long_string():
text = "x" * {size}
assert "hello world" in text
"""
)
def test_default_verbosity(self, pytester: Pyteste... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,739 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,747 | test_default_verbosity | def | function | def test_default_verbosity(self, pytester: Pytester) -> None:
self.create_test_file(pytester, DEFAULT_REPR_MAX_SIZE)
result = pytester.runpytest()
result.stdout.fnmatch_lines(["*xxx...xxx*"])
def test_increased_verbosity(self, pytester: Pytester) -> None:
self.create_test_file(p... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,748 | create_test_file | ref | function | self.create_test_file(pytester, DEFAULT_REPR_MAX_SIZE)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,749 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,750 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*xxx...xxx*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,752 | test_increased_verbosity | def | function | def test_increased_verbosity(self, pytester: Pytester) -> None:
self.create_test_file(pytester, DEFAULT_REPR_MAX_SIZE)
result = pytester.runpytest("-v")
result.stdout.no_fnmatch_line("*xxx...xxx*")
def test_max_increased_verbosity(self, pytester: Pytester) -> None:
self.create_t... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,753 | create_test_file | ref | function | self.create_test_file(pytester, DEFAULT_REPR_MAX_SIZE)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,754 | runpytest | ref | function | result = pytester.runpytest("-v")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,755 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*xxx...xxx*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,757 | test_max_increased_verbosity | def | function | def test_max_increased_verbosity(self, pytester: Pytester) -> None:
self.create_test_file(pytester, DEFAULT_REPR_MAX_SIZE * 10)
result = pytester.runpytest("-vv")
result.stdout.no_fnmatch_line("*xxx...xxx*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,758 | create_test_file | ref | function | self.create_test_file(pytester, DEFAULT_REPR_MAX_SIZE * 10)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,759 | runpytest | ref | function | result = pytester.runpytest("-vv")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,760 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*xxx...xxx*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 15 | TestNewAPI | def | class | test_config_cache_mkdir test_config_cache_dataerror test_cache_writefail_cachfile_silent unwritable_cache_dir test_cache_writefail_permissions test_cache_failure_warns test_config_cache test_cachefuncarg test_custom_rel_cache_dir test_custom_abs_cache_dir test_custom_cache_dir_with_env_var |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 16 | test_config_cache_mkdir | def | function | def test_config_cache_mkdir(self, pytester: Pytester) -> None:
pytester.makeini("[pytest]")
config = pytester.parseconfigure()
assert config.cache is not None
with pytest.raises(ValueError):
config.cache.mkdir("key/name")
p = config.cache.mkdir("name")
as... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 17 | makeini | ref | function | pytester.makeini("[pytest]")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 18 | parseconfigure | ref | function | config = pytester.parseconfigure()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 20 | raises | ref | function | with pytest.raises(ValueError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 26 | test_config_cache_dataerror | def | function | def test_config_cache_dataerror(self, pytester: Pytester) -> None:
pytester.makeini("[pytest]")
config = pytester.parseconfigure()
assert config.cache is not None
cache = config.cache
pytest.raises(TypeError, lambda: cache.set("key/name", cache))
config.cache.set("key... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 27 | makeini | ref | function | pytester.makeini("[pytest]")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 28 | parseconfigure | ref | function | config = pytester.parseconfigure()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 31 | raises | ref | function | pytest.raises(TypeError, lambda: cache.set("key/name", cache))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 33 | _getvaluepath | ref | function | config.cache._getvaluepath("key/name").write_bytes(b"123invalid")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 37 | filterwarnings | ref | function | @pytest.mark.filterwarnings("ignore:could not create cache path")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 38 | test_cache_writefail_cachfile_silent | def | function | def test_cache_writefail_cachfile_silent(self, pytester: Pytester) -> None:
pytester.makeini("[pytest]")
pytester.path.joinpath(".pytest_cache").write_text("gone wrong")
config = pytester.parseconfigure()
cache = config.cache
assert cache is not None
cache.set("test/b... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 39 | makeini | ref | function | pytester.makeini("[pytest]")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 41 | parseconfigure | ref | function | config = pytester.parseconfigure()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 47 | unwritable_cache_dir | def | function | def unwritable_cache_dir(self, pytester: Pytester) -> Generator[Path, None, None]:
cache_dir = pytester.path.joinpath(".pytest_cache")
cache_dir.mkdir()
mode = cache_dir.stat().st_mode
cache_dir.chmod(0)
if os.access(cache_dir, os.W_OK):
pytest.skip("Failed to mak... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 53 | skip | ref | function | pytest.skip("Failed to make cache dir unwritable")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 58 | filterwarnings | ref | function | @pytest.mark.filterwarnings(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 61 | test_cache_writefail_permissions | def | function | def test_cache_writefail_permissions(
self, unwritable_cache_dir: Path, pytester: Pytester
) -> None:
pytester.makeini("[pytest]")
config = pytester.parseconfigure()
cache = config.cache
assert cache is not None
cache.set("test/broken", [])
@pytest.mark.filte... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 64 | makeini | ref | function | pytester.makeini("[pytest]")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 65 | parseconfigure | ref | function | config = pytester.parseconfigure()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 70 | filterwarnings | ref | function | @pytest.mark.filterwarnings("default")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 71 | test_cache_failure_warns | def | function | def test_cache_failure_warns(
self,
pytester: Pytester,
monkeypatch: MonkeyPatch,
unwritable_cache_dir: Path,
) -> None:
monkeypatch.setenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", "1")
pytester.makepyfile("def test_error(): raise Exception")
result = pytester.r... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 77 | setenv | ref | function | monkeypatch.setenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", "1")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 79 | makepyfile | ref | function | pytester.makepyfile("def test_error(): raise Exception")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 80 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 83 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 95 | test_config_cache | def | function | def test_config_cache(self, pytester: Pytester) -> None:
pytester.makeconftest(
"""
def pytest_configure(config):
# see that we get cache information early on
assert hasattr(config, "cache")
"""
)
pytester.makepyfile(
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 96 | makeconftest | ref | function | pytester.makeconftest(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 103 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 109 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 111 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 passed*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 113 | test_cachefuncarg | def | function | def test_cachefuncarg(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
def test_cachefuncarg(cache):
val = cache.get("some/thing", None)
assert val is None
cache.set("some/thing", [1])
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 114 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 126 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 128 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 passed*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 130 | test_custom_rel_cache_dir | def | function | def test_custom_rel_cache_dir(self, pytester: Pytester) -> None:
rel_cache_dir = os.path.join("custom_cache_dir", "subdir")
pytester.makeini(
"""
[pytest]
cache_dir = {cache_dir}
""".format(
cache_dir=rel_cache_dir
)
)
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 132 | makeini | ref | function | pytester.makeini(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 140 | makepyfile | ref | function | pytester.makepyfile(test_errored="def test_error():\n assert False")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 141 | runpytest | ref | function | pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 144 | test_custom_abs_cache_dir | def | function | def test_custom_abs_cache_dir(
self, pytester: Pytester, tmp_path_factory: TempPathFactory
) -> None:
tmp = tmp_path_factory.mktemp("tmp")
abs_cache_dir = tmp / "custom_cache_dir"
pytester.makeini(
"""
[pytest]
cache_dir = {cache_dir}
"... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 147 | mktemp | ref | function | tmp = tmp_path_factory.mktemp("tmp")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 149 | makeini | ref | function | pytester.makeini(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 157 | makepyfile | ref | function | pytester.makepyfile(test_errored="def test_error():\n assert False")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 158 | runpytest | ref | function | pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 161 | test_custom_cache_dir_with_env_var | def | function | def test_custom_cache_dir_with_env_var(
self, pytester: Pytester, monkeypatch: MonkeyPatch
) -> None:
monkeypatch.setenv("env_var", "custom_cache_dir")
pytester.makeini(
"""
[pytest]
cache_dir = {cache_dir}
""".format(
cache_dir... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 164 | setenv | ref | function | monkeypatch.setenv("env_var", "custom_cache_dir")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 165 | makeini | ref | function | pytester.makeini(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 173 | makepyfile | ref | function | pytester.makepyfile(test_errored="def test_error():\n assert False")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 174 | runpytest | ref | function | pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 178 | parametrize | ref | function | @pytest.mark.parametrize("env", ((), ("TOX_ENV_DIR", "/tox_env_dir")))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 179 | test_cache_reportheader | def | function | def test_cache_reportheader(env, pytester: Pytester, monkeypatch: MonkeyPatch) -> None:
pytester.makepyfile("""def test_foo(): pass""")
if env:
monkeypatch.setenv(*env)
expected = os.path.join(env[1], ".pytest_cache")
else:
monkeypatch.delenv("TOX_ENV_DIR", raising=_False)
ex... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 180 | makepyfile | ref | function | pytester.makepyfile("""def test_foo(): pass""")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 182 | setenv | ref | function | monkeypatch.setenv(*env)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 185 | delenv | ref | function | monkeypatch.delenv("TOX_ENV_DIR", raising=False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 187 | runpytest | ref | function | result = pytester.runpytest("-v")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_cacheprovider.py | testing/test_cacheprovider.py | 188 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["cachedir: %s" % expected])
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.