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,436 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,448 | skipif | ref | function | @pytest.mark.skipif("'__pypy__' in sys.builtin_module_names")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,449 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,473 | test_warn_missing | def | function | def test_warn_missing(pytester: Pytester, cmdline_args, warning_output) -> None:
pytester.makepyfile("")
result = pytester.run(sys.executable, *cmdline_args)
result.stdout.fnmatch_lines(warning_output)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,474 | makepyfile | ref | function | pytester.makepyfile("")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,476 | run | ref | function | result = pytester.run(sys.executable, *cmdline_args)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,477 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(warning_output)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,480 | test_recursion_source_decode | def | function | def test_recursion_source_decode(pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_something():
pass
"""
)
pytester.makeini(
"""
[pytest]
python_files = *.py
"""
)
result = pytester.runpytest("--collect-only")
result.stdout... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,481 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,487 | makeini | ref | function | pytester.makeini(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,493 | runpytest | ref | function | result = pytester.runpytest("--collect-only")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,494 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,501 | test_AssertionError_message | def | function | def test_AssertionError_message(pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_hello():
x,y = 1,2
assert 0, (x,y)
"""
)
result = pytester.runpytest()
result.stdout.fnmatch_lines(
"""
*def test_hello*
*assert 0, (x,y)*
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,502 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,509 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,510 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,519 | test_diff_newline_at_end | def | function | def test_diff_newline_at_end(pytester: Pytester) -> None:
pytester.makepyfile(
r"""
def test_diff():
assert 'asdf' == 'asdf\n'
"""
)
result = pytester.runpytest()
result.stdout.fnmatch_lines(
r"""
*assert 'asdf' == 'asdf\n'
* - asdf
* ? ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,520 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,527 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,528 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,538 | filterwarnings | ref | function | @pytest.mark.filterwarnings("default")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,539 | test_assert_tuple_warning | def | function | def test_assert_tuple_warning(pytester: Pytester) -> None:
msg = "assertion is always true"
pytester.makepyfile(
"""
def test_tuple():
assert(_False, 'you shall not pass')
"""
)
result = pytester.runpytest()
result.stdout.fnmatch_lines([f"*test_assert_tuple_warning.py... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,541 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,547 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,548 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines([f"*test_assert_tuple_warning.py:2:*{msg}*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,551 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,557 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,561 | test_assert_indirect_tuple_no_warning | def | function | def test_assert_indirect_tuple_no_warning(pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_tuple():
tpl = ('foo', 'bar')
assert tpl
"""
)
result = pytester.runpytest()
output = "\n".join(result.stdout.lines)
assert "WR1" not in output
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,562 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,569 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,574 | test_assert_with_unicode | def | function | def test_assert_with_unicode(pytester: Pytester) -> None:
pytester.makepyfile(
"""\
def test_unicode():
assert '유니코드' == 'Unicode'
"""
)
result = pytester.runpytest()
result.stdout.fnmatch_lines(["*AssertionError*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,575 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,581 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,582 | 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,585 | test_raise_unprintable_assertion_error | def | function | def test_raise_unprintable_assertion_error(pytester: Pytester) -> None:
pytester.makepyfile(
r"""
def test_raise_assertion_error():
raise AssertionError('\xff')
"""
)
result = pytester.runpytest()
result.stdout.fnmatch_lines(
[r"> raise AssertionError('\xff'... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,586 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,592 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,593 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,598 | test_raise_assertion_error_raisin_repr | def | function | def test_raise_assertion_error_raisin_repr(pytester: Pytester) -> None:
pytester.makepyfile(
"""
class RaisingRepr(object):
def __repr__(self):
raise Exception()
def test_raising_repr():
raise AssertionError(RaisingRepr())
"""
)
result = py... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,599 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,608 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,609 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,614 | test_issue_1944 | def | function | def test_issue_1944(pytester: Pytester) -> None:
pytester.makepyfile(
"""
def f():
return
assert f() == 10
"""
)
result = pytester.runpytest()
result.stdout.fnmatch_lines(["*1 error*"])
assert (
"AttributeError: 'Module' object has no attribute '_obj'... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,615 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,623 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,624 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 error*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,631 | test_exit_from_assertrepr_compare | def | function | def test_exit_from_assertrepr_compare(monkeypatch) -> None:
def raise_exit(obj):
outcomes.exit("Quitting debugger")
monkeypatch.setattr(util, "istext", raise_exit)
with pytest.raises(outcomes.Exit, match="Quitting debugger"):
callequal(1, 1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,632 | raise_exit | def | function | def raise_exit(obj):
outcomes.exit("Quitting debugger")
monkeypatch.setattr(util, "istext", raise_exit)
with pytest.raises(outcomes.Exit, match="Quitting debugger"):
callequal(1, 1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,637 | raises | ref | function | with pytest.raises(outcomes.Exit, match="Quitting debugger"):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,638 | callequal | ref | function | callequal(1, 1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,641 | test_assertion_location_with_coverage | def | function | def test_assertion_location_with_coverage(pytester: Pytester) -> None:
"""This used to report the wrong location when run with coverage (#5754)."""
p = pytester.makepyfile(
"""
def test():
assert _False, 1
assert _False, 2
"""
)
result = pytester.runpytest... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,643 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,650 | runpytest | ref | function | result = pytester.runpytest(str(p))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,651 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 37 | rewrite | def | function | def rewrite(src: str) -> ast.Module:
tree = ast.parse(src)
rewrite_asserts(tree, src.encode())
return tree
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 39 | rewrite_asserts | ref | function | rewrite_asserts(tree, src.encode())
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 43 | getmsg | def | function | def getmsg(
f, extra_ns: Optional[Mapping[str, object]] = None, *, must_pass: bool = _False
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 47 | from_function | ref | function | src = "\n".join(_pytest._code.Code.from_function(f).source().lines)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 47 | source | ref | function | src = "\n".join(_pytest._code.Code.from_function(f).source().lines)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 48 | rewrite | ref | function | mod = rewrite(src)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 56 | func | ref | function | func() # type: ignore[operator]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 59 | fail | ref | function | pytest.fail("shouldn't have raised")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 66 | fail | ref | function | pytest.fail("function didn't raise at all")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 70 | TestAssertionRewrite | def | class | test_place_initial_imports test_dont_rewrite test_dont_rewrite_plugin test_rewrites_plugin_as_a_package test_honors_pep_235 test_name test_assertrepr_compare_same_width test_dont_rewrite_if_hasattr_fails test_assert_already_has_message test_assertion_message test_assertion_message_multiline test_assertion_message_tuple... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 71 | test_place_initial_imports | def | function | def test_place_initial_imports(self) -> None:
s = """'Doc string'\nother = stuff"""
m = rewrite(s)
assert isinstance(m.body[0], ast.Expr)
for imp in m.body[1:3]:
assert isinstance(imp, ast.Import)
assert imp.lineno == 2
assert imp.col_offset == 0
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 73 | rewrite | ref | function | m = rewrite(s)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 81 | rewrite | ref | function | m = rewrite(s)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 89 | rewrite | ref | function | m = rewrite(s)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 97 | rewrite | ref | function | m = rewrite(s)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 106 | rewrite | ref | function | m = rewrite(s)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 113 | test_dont_rewrite | def | function | def test_dont_rewrite(self) -> None:
s = """'PYTEST_DONT_REWRITE'\nassert 14"""
m = rewrite(s)
assert len(m.body) == 2
assert isinstance(m.body[1], ast.Assert)
assert m.body[1].msg is None
def test_dont_rewrite_plugin(self, pytester: Pytester) -> None:
contents =... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 115 | rewrite | ref | function | m = rewrite(s)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 120 | test_dont_rewrite_plugin | def | function | def test_dont_rewrite_plugin(self, pytester: Pytester) -> None:
contents = {
"conftest.py": "pytest_plugins = 'plugin'; import plugin",
"plugin.py": "'PYTEST_DONT_REWRITE'",
"test_foo.py": "def test_foo(): pass",
}
pytester.makepyfile(**contents)
r... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 126 | makepyfile | ref | function | pytester.makepyfile(**contents)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 127 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 130 | test_rewrites_plugin_as_a_package | def | function | def test_rewrites_plugin_as_a_package(self, pytester: Pytester) -> None:
pkgdir = pytester.mkpydir("plugin")
pkgdir.joinpath("__init__.py").write_text(
"import pytest\n"
"@pytest.fixture\n"
"def special_asserter():\n"
" def special_assert(x, y):\n"
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 131 | mkpydir | ref | function | pkgdir = pytester.mkpydir("plugin")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 140 | makeconftest | ref | function | pytester.makeconftest('pytest_plugins = ["plugin"]')
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 141 | makepyfile | ref | function | pytester.makepyfile("def test(special_asserter): special_asserter(1, 2)\n")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 142 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 143 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*assert 1 == 2*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 145 | test_honors_pep_235 | def | function | def test_honors_pep_235(self, pytester: Pytester, monkeypatch) -> None:
# note: couldn't make it fail on macos with a single `sys.path` entry
# note: these modules are named `test_*` to trigger rewriting
pytester.makepyfile(test_y="x = 1")
xdir = pytester.mkdir("x")
pytester.... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 148 | makepyfile | ref | function | pytester.makepyfile(test_y="x = 1")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 150 | mkpydir | ref | function | pytester.mkpydir(str(xdir.joinpath("test_Y")))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 152 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 159 | syspath_prepend | ref | function | monkeypatch.syspath_prepend(str(xdir))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 160 | runpytest | ref | function | pytester.runpytest().assert_outcomes(passed=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 160 | assert_outcomes | ref | function | pytester.runpytest().assert_outcomes(passed=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 162 | test_name | def | function | def test_name(self, request) -> None:
def f1() -> None:
assert _False
assert getmsg(f1) == "assert _False"
def f2() -> None:
f = _False
assert f
assert getmsg(f2) == "assert _False"
def f3() -> None:
assert a_global # type:... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 163 | f1 | def | function | def f1() -> None:
assert _False
assert getmsg(f1) == "assert _False"
def f2() -> None:
f = _False
assert f
assert getmsg(f2) == "assert _False"
def f3() -> None:
assert a_global # type: ignore[name-defined] # noqa
asse... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 166 | getmsg | ref | function | assert getmsg(f1) == "assert False"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 168 | f2 | def | function | def f2() -> None:
f = _False
assert f
assert getmsg(f2) == "assert _False"
def f3() -> None:
assert a_global # type: ignore[name-defined] # noqa
assert getmsg(f3, {"a_global": _False}) == "assert _False"
def f4() -> None:
asser... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 172 | getmsg | ref | function | assert getmsg(f2) == "assert False"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 174 | f3 | def | function | def f3() -> None:
assert a_global # type: ignore[name-defined] # noqa
assert getmsg(f3, {"a_global": _False}) == "assert _False"
def f4() -> None:
assert sys == 42 # type: ignore[comparison-overlap]
verbose = request.config.getoption("verbose")
msg = ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 177 | getmsg | ref | function | assert getmsg(f3, {"a_global": False}) == "assert False"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 179 | f4 | def | function | def f4() -> None:
assert sys == 42 # type: ignore[comparison-overlap]
verbose = request.config.getoption("verbose")
msg = getmsg(f4, {"sys": sys})
if verbose > 0:
assert msg == (
"assert <module 'sys' (built-in)> == 42\n"
" +<mod... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 182 | getoption | ref | function | verbose = request.config.getoption("verbose")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 183 | getmsg | ref | function | msg = getmsg(f4, {"sys": sys})
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 193 | f5 | def | function | def f5() -> None:
assert cls == 42 # type: ignore[name-defined] # noqa: F821
class X:
pass
msg = getmsg(f5, {"cls": X})
assert msg is not None
lines = msg.splitlines()
if verbose > 1:
assert lines == [
f"assert {X!r}... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertrewrite.py | testing/test_assertrewrite.py | 196 | X | def | class |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.