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/bench/manyparam.py | bench/manyparam.py | 4 | foo | def | function | def foo(request):
return request.param
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/bench/manyparam.py | bench/manyparam.py | 8 | test_it | def | function | def test_it(foo):
pass
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/bench/manyparam.py | bench/manyparam.py | 12 | test_it2 | def | function | def test_it2(foo):
pass
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/bench/skip.py | bench/skip.py | 5 | parametrize | ref | function | @pytest.mark.parametrize("x", range(5000))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/bench/skip.py | bench/skip.py | 6 | test_foo | def | function | def test_foo(x):
if SKIP:
pytest.skip("heh")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/bench/skip.py | bench/skip.py | 8 | skip | ref | function | pytest.skip("heh")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/conf.py | doc/en/conf.py | 174 | abspath | ref | function | sys.path.append(os.path.abspath("_themes"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/conf.py | doc/en/conf.py | 400 | configure_logging | def | function | def configure_logging(app: "sphinx.application.Sphinx") -> None:
"""Configure Sphinx's WarningHandler to handle (expected) missing include."""
import sphinx.util.logging
import logging
class WarnLogFilter(logging.Filter):
def filter(self, record: logging.LogRecord) -> bool:
"""Ignor... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/conf.py | doc/en/conf.py | 405 | WarnLogFilter | def | class | filter |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/conf.py | doc/en/conf.py | 420 | WarnLogFilter | ref | function | warn_handler[0].filters.insert(0, WarnLogFilter())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/conf.py | doc/en/conf.py | 423 | setup | def | function | def setup(app: "sphinx.application.Sphinx") -> None:
# from sphinx.ext.autodoc import cut_lines
# app.connect('autodoc-process-docstring', cut_lines(4, what=['module']))
app.add_crossref_type(
"fixture",
"fixture",
objname="built-in fixture",
indextemplate="pair: %s; fixture"... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/conf.py | doc/en/conf.py | 426 | add_crossref_type | ref | function | app.add_crossref_type(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/conf.py | doc/en/conf.py | 433 | add_object_type | ref | function | app.add_object_type(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/conf.py | doc/en/conf.py | 440 | add_object_type | ref | function | app.add_object_type(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/conf.py | doc/en/conf.py | 447 | configure_logging | ref | function | configure_logging(app)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/conf.py | doc/en/conf.py | 459 | patched_is_final | def | function | def patched_is_final(self, decorators: List[ast.expr]) -> bool:
if original_is_final(self, decorators):
return _True
return any(
sphinx.pycode.ast.unparse(decorator) == "final" for decorator in decorators
)
sphinx.pycode.parser.VariableCommentPicker.is_final = pa... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/conf.py | doc/en/conf.py | 460 | original_is_final | ref | function | if original_is_final(self, decorators):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 4 | otherfunc | def | function | def otherfunc(a, b):
assert a == b
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 8 | somefunc | def | function | def somefunc(x, y):
otherfunc(x, y)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 9 | otherfunc | ref | function | otherfunc(x, y)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 12 | otherfunc_multi | def | function | def otherfunc_multi(a, b):
assert a == b
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 16 | parametrize | ref | function | @pytest.mark.parametrize("param1, param2", [(3, 6)])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 17 | test_generative | def | function | def test_generative(param1, param2):
assert param1 * 2 < param2
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 21 | TestFailing | def | class | test_simple test_simple_multiline test_not |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 22 | test_simple | def | function | def test_simple(self):
def f():
return 42
def g():
return 43
assert f() == g()
def test_simple_multiline(self):
otherfunc_multi(42, 6 * 9)
def test_not(self):
def f():
return 42
assert not f()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 23 | f | def | function | def f():
return 42
def g():
return 43
assert f() == g()
def test_simple_multiline(self):
otherfunc_multi(42, 6 * 9)
def test_not(self):
def f():
return 42
assert not f()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 26 | g | def | function | def g():
return 43
assert f() == g()
def test_simple_multiline(self):
otherfunc_multi(42, 6 * 9)
def test_not(self):
def f():
return 42
assert not f()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 29 | f | ref | function | assert f() == g()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 29 | g | ref | function | assert f() == g()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 31 | test_simple_multiline | def | function | def test_simple_multiline(self):
otherfunc_multi(42, 6 * 9)
def test_not(self):
def f():
return 42
assert not f()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 32 | otherfunc_multi | ref | function | otherfunc_multi(42, 6 * 9)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 34 | test_not | def | function | def test_not(self):
def f():
return 42
assert not f()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 35 | f | def | function | def f():
return 42
def g():
return 43
assert f() == g()
def test_simple_multiline(self):
otherfunc_multi(42, 6 * 9)
def test_not(self):
def f():
return 42
assert not f()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 38 | f | ref | function | assert not f()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 41 | TestSpecialisedExplanations | def | class | test_eq_text test_eq_similar_text test_eq_multiline_text test_eq_long_text test_eq_long_text_multiline test_eq_list test_eq_list_long test_eq_dict test_eq_set test_eq_longer_list test_in_list test_not_in_text_multiline test_not_in_text_single test_not_in_text_single_long test_not_in_text_single_long_term test_eq_datacl... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 42 | test_eq_text | def | function | def test_eq_text(self):
assert "spam" == "eggs"
def test_eq_similar_text(self):
assert "foo 1 bar" == "foo 2 bar"
def test_eq_multiline_text(self):
assert "foo\nspam\nbar" == "foo\neggs\nbar"
def test_eq_long_text(self):
a = "1" * 100 + "a" + "2" * 100
b = "1" ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 45 | test_eq_similar_text | def | function | def test_eq_similar_text(self):
assert "foo 1 bar" == "foo 2 bar"
def test_eq_multiline_text(self):
assert "foo\nspam\nbar" == "foo\neggs\nbar"
def test_eq_long_text(self):
a = "1" * 100 + "a" + "2" * 100
b = "1" * 100 + "b" + "2" * 100
assert a == b
def test_e... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 48 | test_eq_multiline_text | def | function | def test_eq_multiline_text(self):
assert "foo\nspam\nbar" == "foo\neggs\nbar"
def test_eq_long_text(self):
a = "1" * 100 + "a" + "2" * 100
b = "1" * 100 + "b" + "2" * 100
assert a == b
def test_eq_long_text_multiline(self):
a = "1\n" * 100 + "a" + "2\n" * 100
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 51 | test_eq_long_text | def | function | def test_eq_long_text(self):
a = "1" * 100 + "a" + "2" * 100
b = "1" * 100 + "b" + "2" * 100
assert a == b
def test_eq_long_text_multiline(self):
a = "1\n" * 100 + "a" + "2\n" * 100
b = "1\n" * 100 + "b" + "2\n" * 100
assert a == b
def test_eq_list(self):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 56 | test_eq_long_text_multiline | def | function | def test_eq_long_text_multiline(self):
a = "1\n" * 100 + "a" + "2\n" * 100
b = "1\n" * 100 + "b" + "2\n" * 100
assert a == b
def test_eq_list(self):
assert [0, 1, 2] == [0, 1, 3]
def test_eq_list_long(self):
a = [0] * 100 + [1] + [3] * 100
b = [0] * 100 + [2... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 61 | test_eq_list | def | function | def test_eq_list(self):
assert [0, 1, 2] == [0, 1, 3]
def test_eq_list_long(self):
a = [0] * 100 + [1] + [3] * 100
b = [0] * 100 + [2] + [3] * 100
assert a == b
def test_eq_dict(self):
assert {"a": 0, "b": 1, "c": 0} == {"a": 0, "b": 2, "d": 0}
def test_eq_set(... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 64 | test_eq_list_long | def | function | def test_eq_list_long(self):
a = [0] * 100 + [1] + [3] * 100
b = [0] * 100 + [2] + [3] * 100
assert a == b
def test_eq_dict(self):
assert {"a": 0, "b": 1, "c": 0} == {"a": 0, "b": 2, "d": 0}
def test_eq_set(self):
assert {0, 10, 11, 12} == {0, 20, 21}
def test_... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 69 | test_eq_dict | def | function | def test_eq_dict(self):
assert {"a": 0, "b": 1, "c": 0} == {"a": 0, "b": 2, "d": 0}
def test_eq_set(self):
assert {0, 10, 11, 12} == {0, 20, 21}
def test_eq_longer_list(self):
assert [1, 2] == [1, 2, 3]
def test_in_list(self):
assert 1 in [0, 2, 3, 4, 5]
def test_... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 72 | test_eq_set | def | function | def test_eq_set(self):
assert {0, 10, 11, 12} == {0, 20, 21}
def test_eq_longer_list(self):
assert [1, 2] == [1, 2, 3]
def test_in_list(self):
assert 1 in [0, 2, 3, 4, 5]
def test_not_in_text_multiline(self):
text = "some multiline\ntext\nwhich\nincludes foo\nand a\nta... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 75 | test_eq_longer_list | def | function | def test_eq_longer_list(self):
assert [1, 2] == [1, 2, 3]
def test_in_list(self):
assert 1 in [0, 2, 3, 4, 5]
def test_not_in_text_multiline(self):
text = "some multiline\ntext\nwhich\nincludes foo\nand a\ntail"
assert "foo" not in text
def test_not_in_text_single(self... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 78 | test_in_list | def | function | def test_in_list(self):
assert 1 in [0, 2, 3, 4, 5]
def test_not_in_text_multiline(self):
text = "some multiline\ntext\nwhich\nincludes foo\nand a\ntail"
assert "foo" not in text
def test_not_in_text_single(self):
text = "single foo line"
assert "foo" not in text
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 81 | test_not_in_text_multiline | def | function | def test_not_in_text_multiline(self):
text = "some multiline\ntext\nwhich\nincludes foo\nand a\ntail"
assert "foo" not in text
def test_not_in_text_single(self):
text = "single foo line"
assert "foo" not in text
def test_not_in_text_single_long(self):
text = "head "... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 85 | test_not_in_text_single | def | function | def test_not_in_text_single(self):
text = "single foo line"
assert "foo" not in text
def test_not_in_text_single_long(self):
text = "head " * 50 + "foo " + "tail " * 20
assert "foo" not in text
def test_not_in_text_single_long_term(self):
text = "head " * 50 + "f" *... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 89 | test_not_in_text_single_long | def | function | def test_not_in_text_single_long(self):
text = "head " * 50 + "foo " + "tail " * 20
assert "foo" not in text
def test_not_in_text_single_long_term(self):
text = "head " * 50 + "f" * 70 + "tail " * 20
assert "f" * 70 not in text
def test_eq_dataclass(self):
from data... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 93 | test_not_in_text_single_long_term | def | function | def test_not_in_text_single_long_term(self):
text = "head " * 50 + "f" * 70 + "tail " * 20
assert "f" * 70 not in text
def test_eq_dataclass(self):
from dataclasses import dataclass
@dataclass
class Foo:
a: int
b: str
left = Foo(1, "b")
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 97 | test_eq_dataclass | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 101 | Foo | def | class | _get_b |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 105 | Foo | ref | function | left = Foo(1, "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 106 | Foo | ref | function | right = Foo(1, "c")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 109 | test_eq_attrs | def | function | def test_eq_attrs(self):
import attr
@attr.s
class Foo:
a = attr.ib()
b = attr.ib()
left = Foo(1, "b")
right = Foo(1, "c")
assert left == right
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 113 | Foo | def | class | _get_b |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 117 | Foo | ref | function | left = Foo(1, "b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 118 | Foo | ref | function | right = Foo(1, "c")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 122 | test_attribute | def | function | def test_attribute():
class Foo:
b = 1
i = Foo()
assert i.b == 2
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 123 | Foo | def | class | _get_b |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 126 | Foo | ref | function | i = Foo()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 130 | test_attribute_instance | def | function | def test_attribute_instance():
class Foo:
b = 1
assert Foo().b == 2
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 131 | Foo | def | class | _get_b |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 134 | Foo | ref | function | assert Foo().b == 2
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 137 | test_attribute_failure | def | function | def test_attribute_failure():
class Foo:
def _get_b(self):
raise Exception("Failed to get attrib")
b = property(_get_b)
i = Foo()
assert i.b == 2
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 138 | Foo | def | class | _get_b |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 139 | _get_b | def | function | def _get_b(self):
raise Exception("Failed to get attrib")
b = property(_get_b)
i = Foo()
assert i.b == 2
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 144 | Foo | ref | function | i = Foo()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 148 | test_attribute_multiple | def | function | def test_attribute_multiple():
class Foo:
b = 1
class Bar:
b = 2
assert Foo().b == Bar().b
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 149 | Foo | def | class | _get_b |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 152 | Bar | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 155 | Foo | ref | function | assert Foo().b == Bar().b
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 155 | Bar | ref | function | assert Foo().b == Bar().b
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 158 | globf | def | function | def globf(x):
return x + 1
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 162 | TestRaises | def | class | test_raises test_raises_doesnt test_raise test_tupleerror test_reinterpret_fails_with_print_for_the_fun_of_it test_some_error func1 |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 163 | test_raises | def | function | def test_raises(self):
s = "qwe"
raises(TypeError, int, s)
def test_raises_doesnt(self):
raises(OSError, int, "3")
def test_raise(self):
raise ValueError("demo error")
def test_tupleerror(self):
a, b = [1] # NOQA
def test_reinterpret_fails_with_print_for_... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 165 | raises | ref | function | raises(TypeError, int, s)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 167 | test_raises_doesnt | def | function | def test_raises_doesnt(self):
raises(OSError, int, "3")
def test_raise(self):
raise ValueError("demo error")
def test_tupleerror(self):
a, b = [1] # NOQA
def test_reinterpret_fails_with_print_for_the_fun_of_it(self):
items = [1, 2, 3]
print(f"items is {items!r... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 168 | raises | ref | function | raises(OSError, int, "3")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 170 | test_raise | def | function | def test_raise(self):
raise ValueError("demo error")
def test_tupleerror(self):
a, b = [1] # NOQA
def test_reinterpret_fails_with_print_for_the_fun_of_it(self):
items = [1, 2, 3]
print(f"items is {items!r}")
a, b = items.pop()
def test_some_error(self):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 173 | test_tupleerror | def | function | def test_tupleerror(self):
a, b = [1] # NOQA
def test_reinterpret_fails_with_print_for_the_fun_of_it(self):
items = [1, 2, 3]
print(f"items is {items!r}")
a, b = items.pop()
def test_some_error(self):
if namenotexi: # NOQA
pass
def func1(self):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 176 | test_reinterpret_fails_with_print_for_the_fun_of_it | def | function | def test_reinterpret_fails_with_print_for_the_fun_of_it(self):
items = [1, 2, 3]
print(f"items is {items!r}")
a, b = items.pop()
def test_some_error(self):
if namenotexi: # NOQA
pass
def func1(self):
assert 41 == 42
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 181 | test_some_error | def | function | def test_some_error(self):
if namenotexi: # NOQA
pass
def func1(self):
assert 41 == 42
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 185 | func1 | def | function | def func1(self):
assert 41 == 42
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 190 | test_dynamic_compile_shows_nicely | def | function | def test_dynamic_compile_shows_nicely():
import importlib.util
import sys
src = "def foo():\n assert 1 == 0\n"
name = "abc-123"
spec = importlib.util.spec_from_loader(name, loader=None)
module = importlib.util.module_from_spec(spec)
code = compile(src, name, "exec")
exec(code, module.__... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 201 | foo | ref | function | module.foo()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 204 | TestMoreErrors | def | class | test_complex_error test_z1_unpack_error test_z2_type_error test_startswith test_startswith_nested test_global_func test_instance test_compare test_try_finally |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 205 | test_complex_error | def | function | def test_complex_error(self):
def f():
return 44
def g():
return 43
somefunc(f(), g())
def test_z1_unpack_error(self):
items = []
a, b = items
def test_z2_type_error(self):
items = 3
a, b = items
def test_startswith(sel... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 206 | f | def | function | def f():
return 42
def g():
return 43
assert f() == g()
def test_simple_multiline(self):
otherfunc_multi(42, 6 * 9)
def test_not(self):
def f():
return 42
assert not f()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 209 | g | def | function | def g():
return 43
assert f() == g()
def test_simple_multiline(self):
otherfunc_multi(42, 6 * 9)
def test_not(self):
def f():
return 42
assert not f()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 212 | somefunc | ref | function | somefunc(f(), g())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 212 | f | ref | function | somefunc(f(), g())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 212 | g | ref | function | somefunc(f(), g())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 214 | test_z1_unpack_error | def | function | def test_z1_unpack_error(self):
items = []
a, b = items
def test_z2_type_error(self):
items = 3
a, b = items
def test_startswith(self):
s = "123"
g = "456"
assert s.startswith(g)
def test_startswith_nested(self):
def f():
ret... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 218 | test_z2_type_error | def | function | def test_z2_type_error(self):
items = 3
a, b = items
def test_startswith(self):
s = "123"
g = "456"
assert s.startswith(g)
def test_startswith_nested(self):
def f():
return "123"
def g():
return "456"
assert f().star... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 222 | test_startswith | def | function | def test_startswith(self):
s = "123"
g = "456"
assert s.startswith(g)
def test_startswith_nested(self):
def f():
return "123"
def g():
return "456"
assert f().startswith(g())
def test_global_func(self):
assert isinstance(glo... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 227 | test_startswith_nested | def | function | def test_startswith_nested(self):
def f():
return "123"
def g():
return "456"
assert f().startswith(g())
def test_global_func(self):
assert isinstance(globf(42), float)
def test_instance(self):
self.x = 6 * 7
assert self.x != 42
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 228 | f | def | function | def f():
return 42
def g():
return 43
assert f() == g()
def test_simple_multiline(self):
otherfunc_multi(42, 6 * 9)
def test_not(self):
def f():
return 42
assert not f()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 231 | g | def | function | def g():
return 43
assert f() == g()
def test_simple_multiline(self):
otherfunc_multi(42, 6 * 9)
def test_not(self):
def f():
return 42
assert not f()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/doc/en/example/assertion/failure_demo.py | doc/en/example/assertion/failure_demo.py | 234 | f | ref | function | assert f().startswith(g())
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.