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 | 837 | delenv | ref | function | monkeypatch.delenv("PYTHONDONTWRITEBYTECODE", raising=False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 838 | delenv | ref | function | monkeypatch.delenv("PYTHONPYCACHEPREFIX", raising=False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 839 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 845 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 852 | skipif | ref | function | @pytest.mark.skipif('"__pypy__" in sys.modules')
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 853 | test_pyc_vs_pyo | def | function | def test_pyc_vs_pyo(self, pytester: Pytester, monkeypatch) -> None:
pytester.makepyfile(
"""
import pytest
def test_optimized():
"hello"
assert test_optimized.__doc__ is None"""
)
p = make_numbered_dir(root=Path(pytester.pat... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 854 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 861 | make_numbered_dir | ref | function | p = make_numbered_dir(root=Path(pytester.path), prefix="runpytest-")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 863 | setenv | ref | function | monkeypatch.setenv("PYTHONOPTIMIZE", "2")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 864 | delenv | ref | function | monkeypatch.delenv("PYTHONDONTWRITEBYTECODE", raising=False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 865 | delenv | ref | function | monkeypatch.delenv("PYTHONPYCACHEPREFIX", raising=False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 866 | runpytest_subprocess | ref | function | assert pytester.runpytest_subprocess(tmp).ret == 0
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 869 | undo | ref | function | monkeypatch.undo()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 870 | delenv | ref | function | monkeypatch.delenv("PYTHONDONTWRITEBYTECODE", raising=False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 871 | delenv | ref | function | monkeypatch.delenv("PYTHONPYCACHEPREFIX", raising=False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 872 | runpytest_subprocess | ref | function | assert pytester.runpytest_subprocess(tmp).ret == 1
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 875 | test_package | def | function | def test_package(self, pytester: Pytester) -> None:
pkg = pytester.path.joinpath("pkg")
pkg.mkdir()
pkg.joinpath("__init__.py")
pkg.joinpath("test_blah.py").write_text(
"""
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 884 | runpytest | ref | function | assert pytester.runpytest().ret == 0
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 886 | test_translate_newlines | def | function | def test_translate_newlines(self, pytester: Pytester) -> None:
content = "def test_rewritten():\r\n assert '@py_builtins' in globals()"
b = content.encode("utf-8")
pytester.path.joinpath("test_newlines.py").write_bytes(b)
assert pytester.runpytest().ret == 0
def test_package_wit... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 890 | runpytest | ref | function | assert pytester.runpytest().ret == 0
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 892 | test_package_without__init__py | def | function | def test_package_without__init__py(self, pytester: Pytester) -> None:
pkg = pytester.mkdir("a_package_without_init_py")
pkg.joinpath("module.py").touch()
pytester.makepyfile("import a_package_without_init_py.module")
assert pytester.runpytest().ret == ExitCode.NO_TESTS_COLLECTED
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 895 | makepyfile | ref | function | pytester.makepyfile("import a_package_without_init_py.module")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 896 | runpytest | ref | function | assert pytester.runpytest().ret == ExitCode.NO_TESTS_COLLECTED
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 898 | test_rewrite_warning | def | function | def test_rewrite_warning(self, pytester: Pytester) -> None:
pytester.makeconftest(
"""
import pytest
pytest.register_assert_rewrite("_pytest")
"""
)
# needs to be a subprocess because pytester explicitly disables this warning
result = pytes... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 899 | makeconftest | ref | function | pytester.makeconftest(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 906 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 907 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*Module already imported*: _pytest"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 909 | test_rewrite_module_imported_from_conftest | def | function | def test_rewrite_module_imported_from_conftest(self, pytester: Pytester) -> None:
pytester.makeconftest(
"""
import test_rewrite_module_imported
"""
)
pytester.makepyfile(
test_rewrite_module_imported="""
def test_rewritten():
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 910 | makeconftest | ref | function | pytester.makeconftest(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 915 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 921 | runpytest_subprocess | ref | function | assert pytester.runpytest_subprocess().ret == 0
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 923 | test_remember_rewritten_modules | def | function | def test_remember_rewritten_modules(
self, pytestconfig, pytester: Pytester, monkeypatch
) -> None:
"""`AssertionRewriteHook` should remember rewritten modules so it
doesn't give false positives (#2005)."""
monkeypatch.syspath_prepend(pytester.path)
pytester.makepyfile(te... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 928 | syspath_prepend | ref | function | monkeypatch.syspath_prepend(pytester.path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 929 | makepyfile | ref | function | pytester.makepyfile(test_remember_rewritten_modules="")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 931 | AssertionRewritingHook | ref | function | hook = AssertionRewritingHook(pytestconfig)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 935 | find_spec | ref | function | spec = hook.find_spec("test_remember_rewritten_modules")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 937 | module_from_spec | ref | function | module = importlib.util.module_from_spec(spec)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 938 | exec_module | ref | function | hook.exec_module(module)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 939 | mark_rewrite | ref | function | hook.mark_rewrite("test_remember_rewritten_modules")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 940 | mark_rewrite | ref | function | hook.mark_rewrite("test_remember_rewritten_modules")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 943 | test_rewrite_warning_using_pytest_plugins | def | function | def test_rewrite_warning_using_pytest_plugins(self, pytester: Pytester) -> None:
pytester.makepyfile(
**{
"conftest.py": "pytest_plugins = ['core', 'gui', 'sci']",
"core.py": "",
"gui.py": "pytest_plugins = ['core', 'sci']",
"sci.py... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 944 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 954 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 955 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*= 1 passed in *=*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 956 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*pytest-warning summary*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 958 | test_rewrite_warning_using_pytest_plugins_env_var | def | function | def test_rewrite_warning_using_pytest_plugins_env_var(
self, pytester: Pytester, monkeypatch
) -> None:
monkeypatch.setenv("PYTEST_PLUGINS", "plugin")
pytester.makepyfile(
**{
"plugin.py": "",
"test_rewrite_warning_using_pytest_plugins_env_var.... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 961 | setenv | ref | function | monkeypatch.setenv("PYTEST_PLUGINS", "plugin")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 962 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 974 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 975 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*= 1 passed in *=*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 976 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*pytest-warning summary*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 979 | TestAssertionRewriteHookDetails | def | class | test_sys_meta_path_munged test_write_pyc test_resources_provider_for_loader test_read_pyc test_read_pyc_more_invalid test_reload_is_same_and_reloads test_get_data_support |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 980 | test_sys_meta_path_munged | def | function | def test_sys_meta_path_munged(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_meta_path():
import sys; sys.meta_path = []"""
)
assert pytester.runpytest().ret == 0
def test_write_pyc(self, pytester: Pytester, tmp_path, monkeyp... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 981 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 986 | runpytest | ref | function | assert pytester.runpytest().ret == 0
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 988 | test_write_pyc | def | function | def test_write_pyc(self, pytester: Pytester, tmp_path, monkeypatch) -> None:
from _pytest.assertion.rewrite import _write_pyc
from _pytest.assertion import AssertionState
config = pytester.parseconfig()
state = AssertionState(config, "rewrite")
tmp_path.joinpath("source.py")... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 992 | parseconfig | ref | function | config = pytester.parseconfig()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 993 | AssertionState | ref | function | state = AssertionState(config, "rewrite")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 998 | _write_pyc | ref | function | assert _write_pyc(state, co, os.stat(source_path), pycpath)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,004 | atomic_write_failed | def | function | null |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,015 | raise_oserror | def | function | def raise_oserror(*args):
raise OSError()
monkeypatch.setattr("os.rename", raise_oserror)
assert not _write_pyc(state, co, os.stat(source_path), pycpath)
def test_resources_provider_for_loader(self, pytester: Pytester) -> None:
"""
Attempts to load ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,020 | _write_pyc | ref | function | assert not _write_pyc(state, co, os.stat(source_path), pycpath)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,022 | test_resources_provider_for_loader | def | function | def test_resources_provider_for_loader(self, pytester: Pytester) -> None:
"""
Attempts to load resources from a package should succeed normally,
even when the AssertionRewriteHook is used to load the modules.
See #366 for details.
"""
pytest.importorskip("pkg_resourc... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,029 | importorskip | ref | function | pytest.importorskip("pkg_resources")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,031 | mkpydir | ref | function | pytester.mkpydir("testpkg")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,046 | makepyfile | ref | function | pytester.makepyfile(**contents)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,047 | maketxtfile | ref | function | pytester.maketxtfile(**{"testpkg/resource": "Load me please."})
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,049 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,050 | assert_outcomes | ref | function | result.assert_outcomes(passed=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,052 | test_read_pyc | def | function | def test_read_pyc(self, tmp_path: Path) -> None:
"""
Ensure that the `_read_pyc` can properly deal with corrupted pyc files.
In those circumstances it should just give up instead of generating
an exception that is propagated to the caller.
"""
import py_compile
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,072 | _read_pyc | ref | function | assert _read_pyc(source, pyc) is None # no error
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,074 | skipif | ref | function | @pytest.mark.skipif(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,077 | test_read_pyc_more_invalid | def | function | def test_read_pyc_more_invalid(self, tmp_path: Path) -> None:
from _pytest.assertion.rewrite import _read_pyc
source = tmp_path / "source.py"
pyc = tmp_path / "source.pyc"
source_bytes = b"def test(): pass\n"
source.write_bytes(source_bytes)
magic = importlib.util.... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,091 | from_bytes | ref | function | mtime_int = int.from_bytes(mtime, "little")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,094 | to_bytes | ref | function | size = len(source_bytes).to_bytes(4, "little")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,100 | _read_pyc | ref | function | assert _read_pyc(source, pyc, print) is not None
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,104 | _read_pyc | ref | function | assert _read_pyc(source, pyc, print) is None
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,108 | _read_pyc | ref | function | assert _read_pyc(source, pyc, print) is None
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,112 | _read_pyc | ref | function | assert _read_pyc(source, pyc, print) is None
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,116 | _read_pyc | ref | function | assert _read_pyc(source, pyc, print) is None
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,120 | _read_pyc | ref | function | assert _read_pyc(source, pyc, print) is None
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,122 | test_reload_is_same_and_reloads | def | function | def test_reload_is_same_and_reloads(self, pytester: Pytester) -> None:
"""Reloading a (collected) module after change picks up the change."""
pytester.makeini(
"""
[pytest]
python_files = *.py
"""
)
pytester.makepyfile(
file... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,124 | makeini | ref | function | pytester.makeini(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,130 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,151 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,152 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 1 passed*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,154 | test_get_data_support | def | function | def test_get_data_support(self, pytester: Pytester) -> None:
"""Implement optional PEP302 api (#808)."""
path = pytester.mkpydir("foo")
path.joinpath("test_foo.py").write_text(
textwrap.dedent(
"""\
class Test(object):
def test_... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,156 | mkpydir | ref | function | path = pytester.mkpydir("foo")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,169 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,170 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 passed*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,173 | test_issue731 | def | function | def test_issue731(pytester: Pytester) -> None:
pytester.makepyfile(
"""
class LongReprWithBraces(object):
def __repr__(self):
return 'LongReprWithBraces({' + ('a' * 80) + '}' + ('a' * 120) + ')'
def some_method(self):
return _False
def test_long_repr():
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,174 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,188 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,189 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*unbalanced braces*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,192 | TestIssue925 | def | class | test_simple_case test_long_case test_many_brackets |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,193 | test_simple_case | def | function | def test_simple_case(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_ternary_display():
assert (_False == _False) == _False
"""
)
result = pytester.runpytest()
result.stdout.fnmatch_lines(["*E*assert (_False == _False) == _... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,194 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,200 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,201 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*E*assert (False == False) == False"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 1,203 | test_long_case | def | function | def test_long_case(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_ternary_display():
assert _False == (_False == _True) == _True
"""
)
result = pytester.runpytest()
result.stdout.fnmatch_lines(["*E*assert (_False == _True... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.