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 | 1,019 | callequal | ref | function | lines = callequal(left, right)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,028 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,029 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,031 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,037 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,039 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*AssertionError*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,041 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,043 | format_explanation | ref | function | assert util.format_explanation(expl) == "assert foo"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,045 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,048 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,050 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,053 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,055 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,058 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,060 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,063 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,065 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,068 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,070 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,089 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,091 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,112 | format_explanation | ref | function | assert util.format_explanation(expl) == res
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,115 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,120 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,122 | _truncate_explanation | ref | function | result = truncate._truncate_explanation(expl, max_lines=8, max_chars=100)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,125 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,127 | _truncate_explanation | ref | function | result = truncate._truncate_explanation(expl, max_lines=8, max_chars=8 * 80)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,130 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,132 | _truncate_explanation | ref | function | result = truncate._truncate_explanation(expl, max_lines=8, max_chars=100)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,140 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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=8 * 80)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,150 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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=8 * 80)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,160 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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=999)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,170 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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=100)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,180 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,186 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,197 | delenv | ref | function | monkeypatch.delenv("CI", raising=False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,199 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,201 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,210 | runpytest | ref | function | result = pytester.runpytest("-vv")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,211 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 6*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,213 | setenv | ref | function | monkeypatch.setenv("CI", "1")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,214 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,215 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 6*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,218 | test_python25_compile_issue257 | def | function | def test_python25_compile_issue257(pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_rewritten():
assert 1 == 2
# some comment
"""
)
result = pytester.runpytest()
assert result.ret == 1
result.stdout.fnmatch_lines(
"""
*E*asser... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,219 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,226 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,228 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,236 | test_rewritten | def | function | def test_rewritten(pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_rewritten():
assert "@py_builtins" in globals()
"""
)
assert pytester.runpytest().ret == 0
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,237 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,243 | runpytest | ref | function | assert pytester.runpytest().ret == 0
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,246 | test_reprcompare_notin | def | function | def test_reprcompare_notin() -> None:
assert callop("not in", "foo", "aaafoobbb") == [
"'foo' not in 'aaafoobbb'",
"'foo' is contained here:",
" aaafoobbb",
"? +++",
]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,247 | callop | ref | function | assert callop("not in", "foo", "aaafoobbb") == [
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,255 | test_reprcompare_whitespaces | def | function | def test_reprcompare_whitespaces() -> None:
assert callequal("\r\n", "\n") == [
r"'\r\n' == '\n'",
r"Strings contain only whitespace, escaping them using repr()",
r"- '\n'",
r"+ '\r\n'",
r"? ++",
]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,256 | callequal | ref | function | assert callequal("\r\n", "\n") == [
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,265 | test_pytest_assertrepr_compare_integration | def | function | def test_pytest_assertrepr_compare_integration(pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_hello():
x = set(range(100))
y = x.copy()
y.remove(50)
assert x == y
"""
)
result = pytester.runpytest()
result.stdout.fnmatch... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,266 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,275 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,276 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,287 | test_sequence_comparison_uses_repr | def | function | def test_sequence_comparison_uses_repr(pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_hello():
x = set("hello x")
y = set("hello y")
assert x == y
"""
)
result = pytester.runpytest()
result.stdout.fnmatch_lines(
[
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,288 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,296 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,297 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,309 | test_assertrepr_loaded_per_dir | def | function | def test_assertrepr_loaded_per_dir(pytester: Pytester) -> None:
pytester.makepyfile(test_base=["def test_base(): assert 1 == 2"])
a = pytester.mkdir("a")
a.joinpath("test_a.py").write_text("def test_a(): assert 1 == 2")
a.joinpath("conftest.py").write_text(
'def pytest_assertrepr_compare(): retu... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,310 | makepyfile | ref | function | pytester.makepyfile(test_base=["def test_base(): assert 1 == 2"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,311 | mkdir | ref | function | a = pytester.mkdir("a")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,312 | joinpath | ref | function | a.joinpath("test_a.py").write_text("def test_a(): assert 1 == 2")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,312 | write_text | ref | function | a.joinpath("test_a.py").write_text("def test_a(): assert 1 == 2")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,313 | joinpath | ref | function | a.joinpath("conftest.py").write_text(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,313 | write_text | ref | function | a.joinpath("conftest.py").write_text(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,316 | mkdir | ref | function | b = pytester.mkdir("b")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,317 | joinpath | ref | function | b.joinpath("test_b.py").write_text("def test_b(): assert 1 == 2")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,317 | write_text | ref | function | b.joinpath("test_b.py").write_text("def test_b(): assert 1 == 2")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,318 | joinpath | ref | function | b.joinpath("conftest.py").write_text(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,318 | write_text | ref | function | b.joinpath("conftest.py").write_text(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,322 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,323 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,335 | test_assertion_options | def | function | def test_assertion_options(pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_hello():
x = 3
assert x == 4
"""
)
result = pytester.runpytest()
assert "3 == 4" in result.stdout.str()
result = pytester.runpytest_subprocess("--assert=plain")
r... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,336 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,343 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,345 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess("--assert=plain")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,346 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*3 == 4*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,349 | test_triple_quoted_string_issue113 | def | function | def test_triple_quoted_string_issue113(pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_hello():
assert "" == '''
'''"""
)
result = pytester.runpytest("--fulltrace")
result.stdout.fnmatch_lines(["*1 failed*"])
result.stdout.no_fnmatch_line("*SyntaxError*... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,350 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,356 | runpytest | ref | function | result = pytester.runpytest("--fulltrace")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,357 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 failed*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,358 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*SyntaxError*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,361 | test_traceback_failure | def | function | def test_traceback_failure(pytester: Pytester) -> None:
p1 = pytester.makepyfile(
"""
def g():
return 2
def f(x):
assert x == g()
def test_onefails():
f(3)
"""
)
result = pytester.runpytest(p1, "--tb=long")
result.stdout.fnmatch_lin... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,362 | makepyfile | ref | function | p1 = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,372 | runpytest | ref | function | result = pytester.runpytest(p1, "--tb=long")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,373 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,394 | runpytest | ref | function | result = pytester.runpytest(p1) # "auto"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,395 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,416 | test_exception_handling_no_traceback | def | function | def test_exception_handling_no_traceback(pytester: Pytester) -> None:
"""Handle chain exceptions in tasks submitted by the multiprocess module (#1984)."""
p1 = pytester.makepyfile(
"""
from multiprocessing import Pool
def process_task(n):
assert n == 10
def multitas... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,418 | makepyfile | ref | function | p1 = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,434 | syspathinsert | ref | function | pytester.syspathinsert()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,435 | runpytest | ref | function | result = pytester.runpytest(p1, "--tb=long")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.