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_argcomplete.py | testing/test_argcomplete.py | 18 | write | ref | function | out.write(" bash - python: %s\n" % (res_bash - set(res)))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 27 | _wrapcall | def | function | def _wrapcall(*args, **kargs):
try:
return subprocess.check_output(*args, **kargs).decode().splitlines()
except subprocess.CalledProcessError:
return []
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 29 | decode | ref | function | return subprocess.check_output(*args, **kargs).decode().splitlines()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 34 | FilesCompleter | def | class | __init__ __call__ |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 45 | __call__ | def | function | def __call__(self, prefix, **kwargs):
completion = []
if self.allowednames:
if self.directories:
files = _wrapcall(["bash", "-c", f"compgen -A directory -- '{prefix}'"])
completion += [f + "/" for f in files]
for x in self.allowednames:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 49 | _wrapcall | ref | function | files = _wrapcall(["bash", "-c", f"compgen -A directory -- '{prefix}'"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 52 | _wrapcall | ref | function | completion += _wrapcall(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 56 | _wrapcall | ref | function | completion += _wrapcall(["bash", "-c", f"compgen -A file -- '{prefix}'"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 58 | _wrapcall | ref | function | anticomp = _wrapcall(["bash", "-c", f"compgen -A directory -- '{prefix}'"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 67 | TestArgComplete | def | class | test_compare_with_compgen test_remove_dir_prefix |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 68 | skipif | ref | function | @pytest.mark.skipif("sys.platform in ('win32', 'darwin')")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 69 | test_compare_with_compgen | def | function | def test_compare_with_compgen(
self, tmp_path: Path, monkeypatch: MonkeyPatch
) -> None:
from _pytest._argcomplete import FastFilesCompleter
ffc = FastFilesCompleter()
fc = FilesCompleter()
monkeypatch.chdir(tmp_path)
assert equal_with_bash("", ffc, fc, out=sys... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 74 | FastFilesCompleter | ref | function | ffc = FastFilesCompleter()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 75 | FilesCompleter | ref | function | fc = FilesCompleter()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 77 | chdir | ref | function | monkeypatch.chdir(tmp_path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 79 | equal_with_bash | ref | function | assert equal_with_bash("", ffc, fc, out=sys.stdout)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 84 | equal_with_bash | ref | function | assert equal_with_bash(x, ffc, fc, out=sys.stdout)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 86 | skipif | ref | function | @pytest.mark.skipif("sys.platform in ('win32', 'darwin')")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 87 | test_remove_dir_prefix | def | function | def test_remove_dir_prefix(self):
"""This is not compatible with compgen but it is with bash itself: ls /usr/<TAB>."""
from _pytest._argcomplete import FastFilesCompleter
ffc = FastFilesCompleter()
fc = FilesCompleter()
for x in "/usr/".split():
assert not equal_... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 91 | FastFilesCompleter | ref | function | ffc = FastFilesCompleter()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 92 | FilesCompleter | ref | function | fc = FilesCompleter()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 94 | equal_with_bash | ref | function | assert not equal_with_bash(x, ffc, fc, out=sys.stdout)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 19 | mock_config | def | function | def mock_config(verbose=0):
class Config:
def getoption(self, name):
if name == "verbose":
return verbose
raise KeyError("Not mocked out: %s" % name)
return Config()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 20 | Config | def | class | getoption |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 21 | getoption | def | function | def getoption(self, name):
if name == "verbose":
return verbose
raise KeyError("Not mocked out: %s" % name)
return Config()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 26 | Config | ref | function | return Config()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 29 | TestImportHookInstallation | def | class | test_conftest_assertion_rewrite test_rewrite_assertions_pytester_plugin test_pytest_plugins_rewrite test_pytest_plugins_rewrite_module_names test_pytest_plugins_rewrite_module_names_correctly test_installed_plugin_rewrite test_rewrite_ast test_register_assert_rewrite_checks_types |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 30 | parametrize | ref | function | @pytest.mark.parametrize("initial_conftest", [True, False])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 31 | parametrize | ref | function | @pytest.mark.parametrize("mode", ["plain", "rewrite"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 32 | test_conftest_assertion_rewrite | def | function | def test_conftest_assertion_rewrite(
self, pytester: Pytester, initial_conftest, mode
) -> None:
"""Test that conftest files are using assertion rewrite on import (#1619)."""
pytester.mkdir("foo")
pytester.mkdir("foo/tests")
conftest_path = "conftest.py" if initial_confte... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 36 | mkdir | ref | function | pytester.mkdir("foo")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 37 | mkdir | ref | function | pytester.mkdir("foo/tests")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 53 | makepyfile | ref | function | pytester.makepyfile(**contents)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 54 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess("--assert=%s" % mode)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 61 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines([expected])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 63 | test_rewrite_assertions_pytester_plugin | def | function | def test_rewrite_assertions_pytester_plugin(self, pytester: Pytester) -> None:
"""
Assertions in the pytester plugin must also benefit from assertion
rewriting (#1920).
"""
pytester.makepyfile(
"""
pytest_plugins = ['pytester']
def test_dum... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 68 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 77 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 78 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 89 | fnmatch_lines_random | ref | function | result.stdout.fnmatch_lines_random(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 96 | parametrize | ref | function | @pytest.mark.parametrize("mode", ["plain", "rewrite"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 97 | test_pytest_plugins_rewrite | def | function | def test_pytest_plugins_rewrite(self, pytester: Pytester, mode) -> None:
contents = {
"conftest.py": """
pytest_plugins = ['ham']
""",
"ham.py": """
import pytest
@pytest.fixture
def check_first():
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 115 | makepyfile | ref | function | pytester.makepyfile(**contents)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 116 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess("--assert=%s" % mode)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 123 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines([expected])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 125 | parametrize | ref | function | @pytest.mark.parametrize("mode", ["str", "list"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 126 | test_pytest_plugins_rewrite_module_names | def | function | def test_pytest_plugins_rewrite_module_names(
self, pytester: Pytester, mode
) -> None:
"""Test that pluginmanager correct marks pytest_plugins variables
for assertion rewriting if they are defined as plain strings or
list of strings (#1888).
"""
plugins = '"ham"'... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 148 | makepyfile | ref | function | pytester.makepyfile(**contents)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 149 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess("--assert=rewrite")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 152 | test_pytest_plugins_rewrite_module_names_correctly | def | function | def test_pytest_plugins_rewrite_module_names_correctly(
self, pytester: Pytester
) -> None:
"""Test that we match files correctly when they are marked for rewriting (#2939)."""
contents = {
"conftest.py": """\
pytest_plugins = "ham"
""",
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 168 | makepyfile | ref | function | pytester.makepyfile(**contents)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 169 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess("--assert=rewrite")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 172 | parametrize | ref | function | @pytest.mark.parametrize("mode", ["plain", "rewrite"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 173 | test_installed_plugin_rewrite | def | function | def test_installed_plugin_rewrite(
self, pytester: Pytester, mode, monkeypatch
) -> None:
monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=_False)
# Make sure the hook is installed early enough so that plugins
# installed via setuptools are rewritten.
pytester... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 176 | delenv | ref | function | monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=False)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 179 | mkdir | ref | function | pytester.mkdir("hampkg")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 233 | makepyfile | ref | function | pytester.makepyfile(**contents)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 234 | run | ref | function | result = pytester.run(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 243 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines([expected])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 245 | test_rewrite_ast | def | function | def test_rewrite_ast(self, pytester: Pytester) -> None:
pytester.mkdir("pkg")
contents = {
"pkg/__init__.py": """
import pytest
pytest.register_assert_rewrite('pkg.helper')
""",
"pkg/helper.py": """
def tool():
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 246 | mkdir | ref | function | pytester.mkdir("pkg")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 279 | makepyfile | ref | function | pytester.makepyfile(**contents)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 280 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess("--assert=rewrite")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 281 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 290 | test_register_assert_rewrite_checks_types | def | function | def test_register_assert_rewrite_checks_types(self) -> None:
with pytest.raises(TypeError):
pytest.register_assert_rewrite(["pytest_tests_internal_non_existing"]) # type: ignore
pytest.register_assert_rewrite(
"pytest_tests_internal_non_existing", "pytest_tests_internal_non_... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 291 | raises | ref | function | with pytest.raises(TypeError):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 292 | register_assert_rewrite | ref | function | pytest.register_assert_rewrite(["pytest_tests_internal_non_existing"]) # type: ignore
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 293 | register_assert_rewrite | ref | function | pytest.register_assert_rewrite(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 298 | TestBinReprIntegration | def | class | test_pytest_assertrepr_compare_called |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 299 | test_pytest_assertrepr_compare_called | def | function | def test_pytest_assertrepr_compare_called(self, pytester: Pytester) -> None:
pytester.makeconftest(
"""
import pytest
values = []
def pytest_assertrepr_compare(op, left, right):
values.append((op, left, right))
@pytest.fixture
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 300 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 312 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 320 | runpytest | ref | function | result = pytester.runpytest("-v")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 321 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*test_hello*FAIL*", "*test_check*PASS*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 324 | callop | def | function | def callop(op: str, left: Any, right: Any, verbose: int = 0) -> Optional[List[str]]:
config = mock_config(verbose=verbose)
return plugin.pytest_assertrepr_compare(config, op, left, right)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 325 | mock_config | ref | function | config = mock_config(verbose=verbose)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 326 | pytest_assertrepr_compare | ref | function | return plugin.pytest_assertrepr_compare(config, op, left, right)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 329 | callequal | def | function | def callequal(left: Any, right: Any, verbose: int = 0) -> Optional[List[str]]:
return callop("==", left, right, verbose)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 330 | callop | ref | function | return callop("==", left, right, verbose)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 333 | TestAssert_reprcompare | def | class | test_different_types test_summary test_text_diff test_text_skipping test_text_skipping_verbose test_multiline_text_diff test_bytes_diff_normal test_bytes_diff_verbose test_list test_iterable_full_diff test_iterable_full_diff_ci test_list_different_lengths test_list_wrap_for_multiple_lines test_list_wrap_for_width_rewra... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 334 | test_different_types | def | function | def test_different_types(self) -> None:
assert callequal([0, 1], "foo") is None
def test_summary(self) -> None:
lines = callequal([0, 1], [0, 2])
assert lines is not None
summary = lines[0]
assert len(summary) < 65
def test_text_diff(self) -> None:
assert ca... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 335 | callequal | ref | function | assert callequal([0, 1], "foo") is None
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 337 | test_summary | def | function | def test_summary(self) -> None:
lines = callequal([0, 1], [0, 2])
assert lines is not None
summary = lines[0]
assert len(summary) < 65
def test_text_diff(self) -> None:
assert callequal("spam", "eggs") == [
"'spam' == 'eggs'",
"- eggs",
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 338 | callequal | ref | function | lines = callequal([0, 1], [0, 2])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 343 | test_text_diff | def | function | def test_text_diff(self) -> None:
assert callequal("spam", "eggs") == [
"'spam' == 'eggs'",
"- eggs",
"+ spam",
]
def test_text_skipping(self) -> None:
lines = callequal("a" * 50 + "spam", "a" * 50 + "eggs")
assert lines is not None
as... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 344 | callequal | ref | function | assert callequal("spam", "eggs") == [
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 350 | test_text_skipping | def | function | def test_text_skipping(self) -> None:
lines = callequal("a" * 50 + "spam", "a" * 50 + "eggs")
assert lines is not None
assert "Skipping" in lines[1]
for line in lines:
assert "a" * 50 not in line
def test_text_skipping_verbose(self) -> None:
lines = callequal... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 351 | callequal | ref | function | lines = callequal("a" * 50 + "spam", "a" * 50 + "eggs")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 357 | test_text_skipping_verbose | def | function | def test_text_skipping_verbose(self) -> None:
lines = callequal("a" * 50 + "spam", "a" * 50 + "eggs", verbose=1)
assert lines is not None
assert "- " + "a" * 50 + "eggs" in lines
assert "+ " + "a" * 50 + "spam" in lines
def test_multiline_text_diff(self) -> None:
left = ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 358 | callequal | ref | function | lines = callequal("a" * 50 + "spam", "a" * 50 + "eggs", verbose=1)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 363 | test_multiline_text_diff | def | function | def test_multiline_text_diff(self) -> None:
left = "foo\nspam\nbar"
right = "foo\neggs\nbar"
diff = callequal(left, right)
assert diff is not None
assert "- eggs" in diff
assert "+ spam" in diff
def test_bytes_diff_normal(self) -> None:
"""Check special h... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 366 | callequal | ref | function | diff = callequal(left, right)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 371 | test_bytes_diff_normal | def | function | def test_bytes_diff_normal(self) -> None:
"""Check special handling for bytes diff (#5260)"""
diff = callequal(b"spam", b"eggs")
assert diff == [
"b'spam' == b'eggs'",
"At index 0 diff: b's' != b'e'",
"Use -v to get the full diff",
]
def test... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 373 | callequal | ref | function | diff = callequal(b"spam", b"eggs")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 381 | test_bytes_diff_verbose | def | function | def test_bytes_diff_verbose(self) -> None:
"""Check special handling for bytes diff (#5260)"""
diff = callequal(b"spam", b"eggs", verbose=1)
assert diff == [
"b'spam' == b'eggs'",
"At index 0 diff: b's' != b'e'",
"Full diff:",
"- b'eggs'",
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 383 | callequal | ref | function | diff = callequal(b"spam", b"eggs", verbose=1)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 392 | test_list | def | function | def test_list(self) -> None:
expl = callequal([0, 1], [0, 2])
assert expl is not None
assert len(expl) > 1
@pytest.mark.parametrize(
["left", "right", "expected"],
[
pytest.param(
[0, 1],
[0, 2],
"""
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 393 | callequal | ref | function | expl = callequal([0, 1], [0, 2])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 397 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 400 | param | ref | function | pytest.param(
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.