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_assertion.py | testing/test_assertion.py | 172 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 175 | delenv | ref | function | monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 178 | mkdir | ref | function | pytester.mkdir("hampkg")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 232 | makepyfile | ref | function | pytester.makepyfile(**contents)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 233 | run | ref | function | result = pytester.run(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 242 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines([expected])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 244 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 245 | mkdir | ref | function | pytester.mkdir("pkg")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 278 | makepyfile | ref | function | pytester.makepyfile(**contents)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 279 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess("--assert=rewrite")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 280 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 289 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 290 | raises | ref | function | with pytest.raises(TypeError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 291 | register_assert_rewrite | ref | function | pytest.register_assert_rewrite(["pytest_tests_internal_non_existing"]) # type: ignore
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 292 | register_assert_rewrite | ref | function | pytest.register_assert_rewrite(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 297 | TestBinReprIntegration | def | class | test_pytest_assertrepr_compare_called |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 298 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 299 | makeconftest | ref | function | pytester.makeconftest(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 311 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 319 | runpytest | ref | function | result = pytester.runpytest("-v")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 320 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*test_hello*FAIL*", "*test_check*PASS*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 323 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 324 | mock_config | ref | function | config = mock_config(verbose=verbose)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 325 | pytest_assertrepr_compare | ref | function | return plugin.pytest_assertrepr_compare(config, op, left, right)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 328 | callequal | def | function | def callequal(left: Any, right: Any, verbose: int = 0) -> Optional[List[str]]:
return callop("==", left, right, verbose)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 329 | callop | ref | function | return callop("==", left, right, verbose)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 332 | 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_list_different_lengths test_list_wrap_for_multiple_lines test_list_wrap_for_width_rewrap_same_length test_list_don... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 333 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 334 | callequal | ref | function | assert callequal([0, 1], "foo") is None
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 336 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 337 | callequal | ref | function | lines = callequal([0, 1], [0, 2])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 342 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 343 | callequal | ref | function | assert callequal("spam", "eggs") == [
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 349 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 350 | callequal | ref | function | lines = callequal("a" * 50 + "spam", "a" * 50 + "eggs")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 356 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 357 | callequal | ref | function | lines = callequal("a" * 50 + "spam", "a" * 50 + "eggs", verbose=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 362 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 365 | callequal | ref | function | diff = callequal(left, right)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 370 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 372 | callequal | ref | function | diff = callequal(b"spam", b"eggs")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 380 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 382 | callequal | ref | function | diff = callequal(b"spam", b"eggs", verbose=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 391 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 392 | callequal | ref | function | expl = callequal([0, 1], [0, 2])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 396 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 399 | param | ref | function | pytest.param(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 411 | param | ref | function | pytest.param(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 423 | param | ref | function | pytest.param(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 437 | test_iterable_full_diff | def | function | def test_iterable_full_diff(self, left, right, expected) -> None:
"""Test the full diff assertion failure explanation.
When verbose is _False, then just a -v notice to get the diff is rendered,
when verbose is _True, then ndiff of the pprint is returned.
"""
expl = callequal... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 443 | callequal | ref | function | expl = callequal(left, right, verbose=0)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 446 | callequal | ref | function | verbose_expl = callequal(left, right, verbose=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 450 | test_list_different_lengths | def | function | def test_list_different_lengths(self) -> None:
expl = callequal([0, 1], [0, 1, 2])
assert expl is not None
assert len(expl) > 1
expl = callequal([0, 1, 2], [0, 1])
assert expl is not None
assert len(expl) > 1
def test_list_wrap_for_multiple_lines(self) -> None:
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 451 | callequal | ref | function | expl = callequal([0, 1], [0, 1, 2])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 454 | callequal | ref | function | expl = callequal([0, 1, 2], [0, 1])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 458 | test_list_wrap_for_multiple_lines | def | function | def test_list_wrap_for_multiple_lines(self) -> None:
long_d = "d" * 80
l1 = ["a", "b", "c"]
l2 = ["a", "b", "c", long_d]
diff = callequal(l1, l2, verbose=_True)
assert diff == [
"['a', 'b', 'c'] == ['a', 'b', 'c...dddddddddddd']",
"Right contains one m... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 462 | callequal | ref | function | diff = callequal(l1, l2, verbose=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 475 | callequal | ref | function | diff = callequal(l2, l1, verbose=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 488 | test_list_wrap_for_width_rewrap_same_length | def | function | def test_list_wrap_for_width_rewrap_same_length(self) -> None:
long_a = "a" * 30
long_b = "b" * 30
long_c = "c" * 30
l1 = [long_a, long_b, long_c]
l2 = [long_b, long_c, long_a]
diff = callequal(l1, l2, verbose=_True)
assert diff == [
"['aaaaaaaaaaa... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 494 | callequal | ref | function | diff = callequal(l1, l2, verbose=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 507 | test_list_dont_wrap_strings | def | function | def test_list_dont_wrap_strings(self) -> None:
long_a = "a" * 10
l1 = ["a"] + [long_a for _ in range(0, 7)]
l2 = ["should not get wrapped"]
diff = callequal(l1, l2, verbose=_True)
assert diff == [
"['a', 'aaaaaa...aaaaaaa', ...] == ['should not get wrapped']",
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 511 | callequal | ref | function | diff = callequal(l1, l2, verbose=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 530 | test_dict_wrap | def | function | def test_dict_wrap(self) -> None:
d1 = {"common": 1, "env": {"env1": 1, "env2": 2}}
d2 = {"common": 1, "env": {"env1": 1}}
diff = callequal(d1, d2, verbose=_True)
assert diff == [
"{'common': 1,...1, 'env2': 2}} == {'common': 1,...: {'env1': 1}}",
"Omitting 1... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 534 | callequal | ref | function | diff = callequal(d1, d2, verbose=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 550 | callequal | ref | function | diff = callequal(d1, d2, verbose=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 565 | test_dict | def | function | def test_dict(self) -> None:
expl = callequal({"a": 0}, {"a": 1})
assert expl is not None
assert len(expl) > 1
def test_dict_omitting(self) -> None:
lines = callequal({"a": 0, "b": 1}, {"a": 1, "b": 1})
assert lines is not None
assert lines[1].startswith("Omittin... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 566 | callequal | ref | function | expl = callequal({"a": 0}, {"a": 1})
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 570 | test_dict_omitting | def | function | def test_dict_omitting(self) -> None:
lines = callequal({"a": 0, "b": 1}, {"a": 1, "b": 1})
assert lines is not None
assert lines[1].startswith("Omitting 1 identical item")
assert "Common items" not in lines
for line in lines[1:]:
assert "b" not in line
def t... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 571 | callequal | ref | function | lines = callequal({"a": 0, "b": 1}, {"a": 1, "b": 1})
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 578 | test_dict_omitting_with_verbosity_1 | def | function | def test_dict_omitting_with_verbosity_1(self) -> None:
"""Ensure differing items are visible for verbosity=1 (#1512)."""
lines = callequal({"a": 0, "b": 1}, {"a": 1, "b": 1}, verbose=1)
assert lines is not None
assert lines[1].startswith("Omitting 1 identical item")
assert li... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 580 | callequal | ref | function | lines = callequal({"a": 0, "b": 1}, {"a": 1, "b": 1}, verbose=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 587 | test_dict_omitting_with_verbosity_2 | def | function | def test_dict_omitting_with_verbosity_2(self) -> None:
lines = callequal({"a": 0, "b": 1}, {"a": 1, "b": 1}, verbose=2)
assert lines is not None
assert lines[1].startswith("Common items:")
assert "Omitting" not in lines[1]
assert lines[2] == "{'b': 1}"
def test_dict_diff... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 588 | callequal | ref | function | lines = callequal({"a": 0, "b": 1}, {"a": 1, "b": 1}, verbose=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 594 | test_dict_different_items | def | function | def test_dict_different_items(self) -> None:
lines = callequal({"a": 0}, {"b": 1, "c": 2}, verbose=2)
assert lines == [
"{'a': 0} == {'b': 1, 'c': 2}",
"Left contains 1 more item:",
"{'a': 0}",
"Right contains 2 more items:",
"{'b': 1, 'c':... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 595 | callequal | ref | function | lines = callequal({"a": 0}, {"b": 1, "c": 2}, verbose=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 606 | callequal | ref | function | lines = callequal({"b": 1, "c": 2}, {"a": 0}, verbose=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 618 | test_sequence_different_items | def | function | def test_sequence_different_items(self) -> None:
lines = callequal((1, 2), (3, 4, 5), verbose=2)
assert lines == [
"(1, 2) == (3, 4, 5)",
"At index 0 diff: 1 != 3",
"Right contains one more item: 5",
"Full diff:",
"- (3, 4, 5)",
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 619 | callequal | ref | function | lines = callequal((1, 2), (3, 4, 5), verbose=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 628 | callequal | ref | function | lines = callequal((1, 2, 3), (4,), verbose=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 638 | test_set | def | function | def test_set(self) -> None:
expl = callequal({0, 1}, {0, 2})
assert expl is not None
assert len(expl) > 1
def test_frozenzet(self) -> None:
expl = callequal(frozenset([0, 1]), {0, 2})
assert expl is not None
assert len(expl) > 1
def test_Sequence(self) -> No... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 639 | callequal | ref | function | expl = callequal({0, 1}, {0, 2})
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 643 | test_frozenzet | def | function | def test_frozenzet(self) -> None:
expl = callequal(frozenset([0, 1]), {0, 2})
assert expl is not None
assert len(expl) > 1
def test_Sequence(self) -> None:
# Test comparing with a Sequence subclass.
class TestSequence(MutableSequence[int]):
def __init__(self,... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 644 | callequal | ref | function | expl = callequal(frozenset([0, 1]), {0, 2})
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 648 | test_Sequence | def | function | def test_Sequence(self) -> None:
# Test comparing with a Sequence subclass.
class TestSequence(MutableSequence[int]):
def __init__(self, iterable):
self.elements = list(iterable)
def __getitem__(self, item):
return self.elements[item]
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 650 | TestSequence | def | class | __init__ __getitem__ __len__ __setitem__ __delitem__ insert |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 669 | callequal | ref | function | expl = callequal(TestSequence([0, 1]), list([0, 2]))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 669 | TestSequence | ref | function | expl = callequal(TestSequence([0, 1]), list([0, 2]))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 673 | test_list_tuples | def | function | def test_list_tuples(self) -> None:
expl = callequal([], [(1, 2)])
assert expl is not None
assert len(expl) > 1
expl = callequal([(1, 2)], [])
assert expl is not None
assert len(expl) > 1
def test_repr_verbose(self) -> None:
class Nums:
def __... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 674 | callequal | ref | function | expl = callequal([], [(1, 2)])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 677 | callequal | ref | function | expl = callequal([(1, 2)], [])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 681 | test_repr_verbose | def | function | def test_repr_verbose(self) -> None:
class Nums:
def __init__(self, nums):
self.nums = nums
def __repr__(self):
return str(self.nums)
list_x = list(range(5000))
list_y = list(range(5000))
list_y[len(list_y) // 2] = 3
n... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 682 | Nums | def | class | __init__ __repr__ |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 692 | Nums | ref | function | nums_x = Nums(list_x)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 693 | Nums | ref | function | nums_y = Nums(list_y)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 695 | callequal | ref | function | assert callequal(nums_x, nums_y) is None
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 697 | callequal | ref | function | expl = callequal(nums_x, nums_y, verbose=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 702 | callequal | ref | function | expl = callequal(nums_x, nums_y, verbose=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 707 | test_list_bad_repr | def | function | def test_list_bad_repr(self) -> None:
class A:
def __repr__(self):
raise ValueError(42)
expl = callequal([], [A()])
assert expl is not None
assert "ValueError" in "".join(expl)
expl = callequal({}, {"1": A()}, verbose=2)
assert expl is not... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 708 | A | def | class | __repr__ __repr__ __repr__ |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 712 | callequal | ref | function | expl = callequal([], [A()])
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.