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_assertion.py | testing/test_assertion.py | 870 | test_dataclasses_verbose | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 871 | copy_example | ref | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 872 | runpytest | ref | function | result = pytester.runpytest(p, "-vv")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 873 | assert_outcomes | ref | function | result.assert_outcomes(failed=1, passed=0)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 874 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 883 | skipif | ref | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 884 | test_dataclasses_with_attribute_comparison_off | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 887 | copy_example | ref | function | p = pytester.copy_example(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 890 | runpytest | ref | function | result = pytester.runpytest(p, "-vv")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 891 | assert_outcomes | ref | function | result.assert_outcomes(failed=0, passed=1)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 893 | skipif | ref | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 894 | test_comparing_two_different_data_classes | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 895 | copy_example | ref | function | p = pytester.copy_example(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 898 | runpytest | ref | function | result = pytester.runpytest(p, "-vv")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 899 | assert_outcomes | ref | function | result.assert_outcomes(failed=0, passed=1)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 902 | TestAssert_reprcompare_attrsclass | def | class | test_attrs test_attrs_recursive test_attrs_recursive_verbose test_attrs_verbose test_attrs_with_attribute_comparison_off test_comparing_two_different_attrs_classes |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 903 | test_attrs | def | function | def test_attrs(self) -> None:
@attr.s
class SimpleDataObject:
field_a = attr.ib()
field_b = attr.ib()
left = SimpleDataObject(1, "b")
right = SimpleDataObject(1, "c")
lines = callequal(left, right)
assert lines is not None
assert line... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 905 | SimpleDataObject | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 909 | SimpleDataObject | ref | function | left = SimpleDataObject(1, "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 910 | SimpleDataObject | ref | function | right = SimpleDataObject(1, "c")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 912 | callequal | ref | function | lines = callequal(left, right)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 919 | test_attrs_recursive | def | function | def test_attrs_recursive(self) -> None:
@attr.s
class OtherDataObject:
field_c = attr.ib()
field_d = attr.ib()
@attr.s
class SimpleDataObject:
field_a = attr.ib()
field_b = attr.ib()
left = SimpleDataObject(OtherDataObject(1, ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 921 | OtherDataObject | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 926 | SimpleDataObject | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 930 | SimpleDataObject | ref | function | left = SimpleDataObject(OtherDataObject(1, "a"), "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 930 | OtherDataObject | ref | function | left = SimpleDataObject(OtherDataObject(1, "a"), "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 931 | SimpleDataObject | ref | function | right = SimpleDataObject(OtherDataObject(1, "b"), "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 931 | OtherDataObject | ref | function | right = SimpleDataObject(OtherDataObject(1, "b"), "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 933 | callequal | ref | function | lines = callequal(left, right)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 940 | test_attrs_recursive_verbose | def | function | def test_attrs_recursive_verbose(self) -> None:
@attr.s
class OtherDataObject:
field_c = attr.ib()
field_d = attr.ib()
@attr.s
class SimpleDataObject:
field_a = attr.ib()
field_b = attr.ib()
left = SimpleDataObject(OtherDataOb... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 942 | OtherDataObject | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 947 | SimpleDataObject | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 951 | SimpleDataObject | ref | function | left = SimpleDataObject(OtherDataObject(1, "a"), "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 951 | OtherDataObject | ref | function | left = SimpleDataObject(OtherDataObject(1, "a"), "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 952 | SimpleDataObject | ref | function | right = SimpleDataObject(OtherDataObject(1, "b"), "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 952 | OtherDataObject | ref | function | right = SimpleDataObject(OtherDataObject(1, "b"), "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 954 | callequal | ref | function | lines = callequal(left, right)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 959 | test_attrs_verbose | def | function | def test_attrs_verbose(self) -> None:
@attr.s
class SimpleDataObject:
field_a = attr.ib()
field_b = attr.ib()
left = SimpleDataObject(1, "b")
right = SimpleDataObject(1, "c")
lines = callequal(left, right, verbose=2)
assert lines is not None
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 961 | SimpleDataObject | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 965 | SimpleDataObject | ref | function | left = SimpleDataObject(1, "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 966 | SimpleDataObject | ref | function | right = SimpleDataObject(1, "c")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 968 | callequal | ref | function | lines = callequal(left, right, verbose=2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 974 | test_attrs_with_attribute_comparison_off | def | function | def test_attrs_with_attribute_comparison_off(self) -> None:
@attr.s
class SimpleDataObject:
field_a = attr.ib()
field_b = attr.ib(eq=_False)
left = SimpleDataObject(1, "b")
right = SimpleDataObject(1, "b")
lines = callequal(left, right, verbose=2)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 976 | SimpleDataObject | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 980 | SimpleDataObject | ref | function | left = SimpleDataObject(1, "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 981 | SimpleDataObject | ref | function | right = SimpleDataObject(1, "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 983 | callequal | ref | function | lines = callequal(left, right, verbose=2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 992 | test_comparing_two_different_attrs_classes | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 994 | SimpleDataObjectOne | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 999 | SimpleDataObjectTwo | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,003 | SimpleDataObjectOne | ref | function | left = SimpleDataObjectOne(1, "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,004 | SimpleDataObjectTwo | ref | function | right = SimpleDataObjectTwo(1, "c")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,006 | callequal | ref | function | lines = callequal(left, right)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,010 | TestAssert_reprcompare_namedtuple | def | class | test_namedtuple test_comparing_two_different_namedtuple |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,011 | test_namedtuple | def | function | def test_namedtuple(self) -> None:
NT = collections.namedtuple("NT", ["a", "b"])
left = NT(1, "b")
right = NT(1, "c")
lines = callequal(left, right)
assert lines == [
"NT(a=1, b='b') == NT(a=1, b='c')",
"",
"Omitting 1 identical items, us... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,014 | NT | ref | function | left = NT(1, "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,015 | NT | ref | function | right = NT(1, "c")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,017 | callequal | ref | function | lines = callequal(left, right)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,032 | test_comparing_two_different_namedtuple | def | function | def test_comparing_two_different_namedtuple(self) -> None:
NT1 = collections.namedtuple("NT1", ["a", "b"])
NT2 = collections.namedtuple("NT2", ["a", "b"])
left = NT1(1, "b")
right = NT2(2, "b")
lines = callequal(left, right)
# Because the types are different, uses t... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,036 | NT1 | ref | function | left = NT1(1, "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,037 | NT2 | ref | function | right = NT2(2, "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,039 | callequal | ref | function | lines = callequal(left, right)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,048 | TestFormatExplanation | def | class | test_special_chars_full test_fmt_simple test_fmt_where test_fmt_and test_fmt_where_nested test_fmt_newline test_fmt_newline_escaped test_fmt_newline_before_where test_fmt_multi_newline_before_where |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,049 | test_special_chars_full | def | function | def test_special_chars_full(self, pytester: Pytester) -> None:
# Issue 453, for the bug this would raise IndexError
pytester.makepyfile(
"""
def test_foo():
assert '\\n}' == ''
"""
)
result = pytester.runpytest()
assert result.r... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,051 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,057 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,059 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*AssertionError*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,061 | test_fmt_simple | def | function | def test_fmt_simple(self) -> None:
expl = "assert foo"
assert util.format_explanation(expl) == "assert foo"
def test_fmt_where(self) -> None:
expl = "\n".join(["assert 1", "{1 = foo", "} == 2"])
res = "\n".join(["assert 1 == 2", " + where 1 = foo"])
assert util.format_e... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,063 | format_explanation | ref | function | assert util.format_explanation(expl) == "assert foo"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,065 | test_fmt_where | def | function | def test_fmt_where(self) -> None:
expl = "\n".join(["assert 1", "{1 = foo", "} == 2"])
res = "\n".join(["assert 1 == 2", " + where 1 = foo"])
assert util.format_explanation(expl) == res
def test_fmt_and(self) -> None:
expl = "\n".join(["assert 1", "{1 = foo", "} == 2", "{2 = ba... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,068 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,070 | test_fmt_and | def | function | def test_fmt_and(self) -> None:
expl = "\n".join(["assert 1", "{1 = foo", "} == 2", "{2 = bar", "}"])
res = "\n".join(["assert 1 == 2", " + where 1 = foo", " + and 2 = bar"])
assert util.format_explanation(expl) == res
def test_fmt_where_nested(self) -> None:
expl = "\n".joi... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,073 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,075 | test_fmt_where_nested | def | function | def test_fmt_where_nested(self) -> None:
expl = "\n".join(["assert 1", "{1 = foo", "{foo = bar", "}", "} == 2"])
res = "\n".join(["assert 1 == 2", " + where 1 = foo", " + where foo = bar"])
assert util.format_explanation(expl) == res
def test_fmt_newline(self) -> None:
expl ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,078 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,080 | test_fmt_newline | def | function | def test_fmt_newline(self) -> None:
expl = "\n".join(['assert "foo" == "bar"', "~- foo", "~+ bar"])
res = "\n".join(['assert "foo" == "bar"', " - foo", " + bar"])
assert util.format_explanation(expl) == res
def test_fmt_newline_escaped(self) -> None:
expl = "\n".join(["assert ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,083 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,085 | test_fmt_newline_escaped | def | function | def test_fmt_newline_escaped(self) -> None:
expl = "\n".join(["assert foo == bar", "baz"])
res = "assert foo == bar\\nbaz"
assert util.format_explanation(expl) == res
def test_fmt_newline_before_where(self) -> None:
expl = "\n".join(
[
"the assertion ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,088 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,090 | test_fmt_newline_before_where | def | function | def test_fmt_newline_before_where(self) -> None:
expl = "\n".join(
[
"the assertion message here",
">assert 1",
"{1 = foo",
"} == 2",
"{2 = bar",
"}",
]
)
res = "\n".join(
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,109 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,111 | test_fmt_multi_newline_before_where | def | function | def test_fmt_multi_newline_before_where(self) -> None:
expl = "\n".join(
[
"the assertion",
"~message here",
">assert 1",
"{1 = foo",
"} == 2",
"{2 = bar",
"}",
]
)... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,132 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,135 | TestTruncateExplanation | def | class | test_doesnt_truncate_when_input_is_empty_list test_doesnt_truncate_at_when_input_is_5_lines_and_LT_max_chars test_truncates_at_8_lines_when_given_list_of_empty_strings test_truncates_at_8_lines_when_first_8_lines_are_LT_max_chars test_truncates_at_8_lines_when_first_8_lines_are_EQ_max_chars test_truncates_at_4_lines_wh... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,140 | test_doesnt_truncate_when_input_is_empty_list | def | function | def test_doesnt_truncate_when_input_is_empty_list(self) -> None:
expl: List[str] = []
result = truncate._truncate_explanation(expl, max_lines=8, max_chars=100)
assert result == expl
def test_doesnt_truncate_at_when_input_is_5_lines_and_LT_max_chars(self) -> None:
expl = ["a" * 1... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,142 | _truncate_explanation | ref | function | result = truncate._truncate_explanation(expl, max_lines=8, max_chars=100)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,145 | test_doesnt_truncate_at_when_input_is_5_lines_and_LT_max_chars | def | function | def test_doesnt_truncate_at_when_input_is_5_lines_and_LT_max_chars(self) -> None:
expl = ["a" * 100 for x in range(5)]
result = truncate._truncate_explanation(expl, max_lines=8, max_chars=8 * 80)
assert result == expl
def test_truncates_at_8_lines_when_given_list_of_empty_strings(self) ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,147 | _truncate_explanation | ref | function | result = truncate._truncate_explanation(expl, max_lines=8, max_chars=8 * 80)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,150 | test_truncates_at_8_lines_when_given_list_of_empty_strings | def | function | def test_truncates_at_8_lines_when_given_list_of_empty_strings(self) -> None:
expl = ["" for x in range(50)]
result = truncate._truncate_explanation(expl, max_lines=8, max_chars=100)
assert result != expl
assert len(result) == 8 + self.LINES_IN_TRUNCATION_MSG
assert "Full out... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,152 | _truncate_explanation | ref | function | result = truncate._truncate_explanation(expl, max_lines=8, max_chars=100)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,160 | test_truncates_at_8_lines_when_first_8_lines_are_LT_max_chars | def | function | def test_truncates_at_8_lines_when_first_8_lines_are_LT_max_chars(self) -> None:
expl = ["a" for x in range(100)]
result = truncate._truncate_explanation(expl, max_lines=8, max_chars=8 * 80)
assert result != expl
assert len(result) == 8 + self.LINES_IN_TRUNCATION_MSG
assert "... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,162 | _truncate_explanation | ref | function | result = truncate._truncate_explanation(expl, max_lines=8, max_chars=8 * 80)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,170 | test_truncates_at_8_lines_when_first_8_lines_are_EQ_max_chars | def | function | def test_truncates_at_8_lines_when_first_8_lines_are_EQ_max_chars(self) -> None:
expl = ["a" * 80 for x in range(16)]
result = truncate._truncate_explanation(expl, max_lines=8, max_chars=8 * 80)
assert result != expl
assert len(result) == 8 + self.LINES_IN_TRUNCATION_MSG
asse... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,172 | _truncate_explanation | ref | function | result = truncate._truncate_explanation(expl, max_lines=8, max_chars=8 * 80)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,180 | test_truncates_at_4_lines_when_first_4_lines_are_GT_max_chars | def | function | def test_truncates_at_4_lines_when_first_4_lines_are_GT_max_chars(self) -> None:
expl = ["a" * 250 for x in range(10)]
result = truncate._truncate_explanation(expl, max_lines=8, max_chars=999)
assert result != expl
assert len(result) == 4 + self.LINES_IN_TRUNCATION_MSG
assert... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,182 | _truncate_explanation | ref | function | result = truncate._truncate_explanation(expl, max_lines=8, max_chars=999)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,190 | test_truncates_at_1_line_when_first_line_is_GT_max_chars | def | function | def test_truncates_at_1_line_when_first_line_is_GT_max_chars(self) -> None:
expl = ["a" * 250 for x in range(1000)]
result = truncate._truncate_explanation(expl, max_lines=8, max_chars=100)
assert result != expl
assert len(result) == 1 + self.LINES_IN_TRUNCATION_MSG
assert "F... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,192 | _truncate_explanation | ref | function | result = truncate._truncate_explanation(expl, max_lines=8, max_chars=100)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,200 | test_full_output_truncated | def | function | def test_full_output_truncated(self, monkeypatch, pytester: Pytester) -> None:
"""Test against full runpytest() output."""
line_count = 7
line_len = 100
expected_truncated_lines = 2
pytester.makepyfile(
r"""
def test_many_lines():
a = ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,206 | makepyfile | ref | function | pytester.makepyfile(
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.