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 | 1,217 | delenv | ref | function | monkeypatch.delenv("CI", raising=False)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,219 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,221 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,230 | runpytest | ref | function | result = pytester.runpytest("-vv")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,231 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 6*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,233 | setenv | ref | function | monkeypatch.setenv("CI", "1")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,234 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,235 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 6*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,238 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,239 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,246 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,248 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,256 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,257 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,263 | runpytest | ref | function | assert pytester.runpytest().ret == 0
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,266 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,267 | callop | ref | function | assert callop("not in", "foo", "aaafoobbb") == [
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,275 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,276 | callequal | ref | function | assert callequal("\r\n", "\n") == [
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,285 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,286 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,295 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,296 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,307 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,308 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,316 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,317 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,329 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,330 | makepyfile | ref | function | pytester.makepyfile(test_base=["def test_base(): assert 1 == 2"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,331 | mkdir | ref | function | a = pytester.mkdir("a")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,332 | joinpath | ref | function | a.joinpath("test_a.py").write_text("def test_a(): assert 1 == 2")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,332 | write_text | ref | function | a.joinpath("test_a.py").write_text("def test_a(): assert 1 == 2")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,333 | joinpath | ref | function | a.joinpath("conftest.py").write_text(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,333 | write_text | ref | function | a.joinpath("conftest.py").write_text(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,336 | mkdir | ref | function | b = pytester.mkdir("b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,337 | joinpath | ref | function | b.joinpath("test_b.py").write_text("def test_b(): assert 1 == 2")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,337 | write_text | ref | function | b.joinpath("test_b.py").write_text("def test_b(): assert 1 == 2")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,338 | joinpath | ref | function | b.joinpath("conftest.py").write_text(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,338 | write_text | ref | function | b.joinpath("conftest.py").write_text(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,342 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,343 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,355 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,356 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,363 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,365 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess("--assert=plain")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,366 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*3 == 4*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,369 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,370 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,376 | runpytest | ref | function | result = pytester.runpytest("--fulltrace")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,377 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 failed*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,378 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*SyntaxError*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,381 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,382 | makepyfile | ref | function | p1 = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,392 | runpytest | ref | function | result = pytester.runpytest(p1, "--tb=long")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,393 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,414 | runpytest | ref | function | result = pytester.runpytest(p1) # "auto"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,415 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,436 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,438 | makepyfile | ref | function | p1 = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,454 | syspathinsert | ref | function | pytester.syspathinsert()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,455 | runpytest | ref | function | result = pytester.runpytest(p1, "--tb=long")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,456 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,468 | skipif | ref | function | @pytest.mark.skipif("'__pypy__' in sys.builtin_module_names")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,469 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,493 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,494 | makepyfile | ref | function | pytester.makepyfile("")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,496 | run | ref | function | result = pytester.run(sys.executable, *cmdline_args)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,497 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(warning_output)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,500 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,501 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,507 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,513 | runpytest | ref | function | result = pytester.runpytest("--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,514 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,521 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,522 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,529 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,530 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,539 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,540 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,547 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,548 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,558 | filterwarnings | ref | function | @pytest.mark.filterwarnings("default")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,559 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,561 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,567 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,568 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines([f"*test_assert_tuple_warning.py:2:*{msg}*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,571 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,577 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,581 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,582 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,589 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,594 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,595 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,601 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,602 | 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,605 | 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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,606 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,612 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,613 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_assertion.py | testing/test_assertion.py | 1,618 | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.