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/python/metafunc.py | testing/python/metafunc.py | 1,830 | makeconftest | ref | function | pytester.makeconftest(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,836 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,849 | runpytest | ref | function | result = pytester.runpytest("-v")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,850 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,854 | test_parametrize_positional_args | def | function | def test_parametrize_positional_args(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.mark.parametrize("a", [1], _False)
def test_foo(a):
pass
"""
)
result = pytester.runpytest()
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,855 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,864 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,865 | assert_outcomes | ref | function | result.assert_outcomes(passed=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,867 | test_parametrize_iterator | def | function | def test_parametrize_iterator(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import itertools
import pytest
id_parametrize = pytest.mark.parametrize(
ids=("param%d" % i for i in itertools.count())
)
@id_pa... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,868 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,890 | runpytest | ref | function | result = pytester.runpytest("-vv", "-s")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,891 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 8 | TestRaises | def | class | test_check_callable test_raises test_raises_function test_raises_callable_no_exception test_raises_falsey_type_error test_raises_repr_inflight test_raises_as_contextmanager test_does_not_raise test_does_not_raise_does_raise test_noclass test_invalid_arguments_to_raises test_tuple test_no_raise_message test_raises_cycli... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 9 | test_check_callable | def | function | def test_check_callable(self) -> None:
with pytest.raises(TypeError, match=r".* must be callable"):
pytest.raises(RuntimeError, "int('qwe')") # type: ignore[call-overload]
def test_raises(self):
excinfo = pytest.raises(ValueError, int, "qwe")
assert "invalid literal" in str... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 10 | raises | ref | function | with pytest.raises(TypeError, match=r".* must be callable"):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 11 | raises | ref | function | pytest.raises(RuntimeError, "int('qwe')") # type: ignore[call-overload]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 13 | test_raises | def | function | def test_raises(self):
excinfo = pytest.raises(ValueError, int, "qwe")
assert "invalid literal" in str(excinfo.value)
def test_raises_function(self):
excinfo = pytest.raises(ValueError, int, "hello")
assert "invalid literal" in str(excinfo.value)
def test_raises_callable_no... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 14 | raises | ref | function | excinfo = pytest.raises(ValueError, int, "qwe")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 17 | test_raises_function | def | function | def test_raises_function(self):
excinfo = pytest.raises(ValueError, int, "hello")
assert "invalid literal" in str(excinfo.value)
def test_raises_callable_no_exception(self) -> None:
class A:
def __call__(self):
pass
try:
pytest.raises(Val... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 18 | raises | ref | function | excinfo = pytest.raises(ValueError, int, "hello")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 21 | test_raises_callable_no_exception | def | function | def test_raises_callable_no_exception(self) -> None:
class A:
def __call__(self):
pass
try:
pytest.raises(ValueError, A())
except pytest.fail.Exception:
pass
def test_raises_falsey_type_error(self) -> None:
with pytest.raises(... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 22 | A | def | class | __call__ |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 23 | __call__ | def | function | def __call__(self):
pass
try:
pytest.raises(ValueError, A())
except pytest.fail.Exception:
pass
def test_raises_falsey_type_error(self) -> None:
with pytest.raises(TypeError):
with pytest.raises(AssertionError, match=0): # ty... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 27 | raises | ref | function | pytest.raises(ValueError, A())
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 27 | A | ref | function | pytest.raises(ValueError, A())
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 31 | test_raises_falsey_type_error | def | function | def test_raises_falsey_type_error(self) -> None:
with pytest.raises(TypeError):
with pytest.raises(AssertionError, match=0): # type: ignore[call-overload]
raise AssertionError("ohai")
def test_raises_repr_inflight(self):
"""Ensure repr() on an exception info inside ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 32 | raises | ref | function | with pytest.raises(TypeError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 33 | raises | ref | function | with pytest.raises(AssertionError, match=0): # type: ignore[call-overload]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 36 | test_raises_repr_inflight | def | function | def test_raises_repr_inflight(self):
"""Ensure repr() on an exception info inside a pytest.raises with block works (#4386)"""
class E(Exception):
pass
with pytest.raises(E) as excinfo:
# this test prints the inflight uninitialized object
# using repr and... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 39 | E | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 42 | raises | ref | function | with pytest.raises(E) as excinfo:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 51 | E | ref | function | raise E()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 53 | test_raises_as_contextmanager | def | function | def test_raises_as_contextmanager(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
import _pytest._code
def test_simple():
with pytest.raises(ZeroDivisionError) as excinfo:
assert isinstance(excinfo... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 54 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 78 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 79 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*3 passed*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 81 | test_does_not_raise | def | function | def test_does_not_raise(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
from contextlib import contextmanager
import pytest
@contextmanager
def does_not_raise():
yield
@pytest.mark.parametrize('example_inpu... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 82 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 103 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 104 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*4 passed*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 106 | test_does_not_raise_does_raise | def | function | def test_does_not_raise_does_raise(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
from contextlib import contextmanager
import pytest
@contextmanager
def does_not_raise():
yield
@pytest.mark.parametrize('e... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 107 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 126 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 127 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*2 failed*"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 129 | test_noclass | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 130 | raises | ref | function | with pytest.raises(TypeError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 131 | raises | ref | function | pytest.raises("wrong", lambda: None) # type: ignore[call-overload]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 133 | test_invalid_arguments_to_raises | def | function | def test_invalid_arguments_to_raises(self) -> None:
with pytest.raises(TypeError, match="unknown"):
with pytest.raises(TypeError, unknown="bogus"): # type: ignore[call-overload]
raise ValueError()
def test_tuple(self):
with pytest.raises((KeyError, ValueError)):
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 134 | raises | ref | function | with pytest.raises(TypeError, match="unknown"):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 135 | raises | ref | function | with pytest.raises(TypeError, unknown="bogus"): # type: ignore[call-overload]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 138 | test_tuple | def | function | def test_tuple(self):
with pytest.raises((KeyError, ValueError)):
raise KeyError("oops")
def test_no_raise_message(self) -> None:
try:
pytest.raises(ValueError, int, "0")
except pytest.fail.Exception as e:
assert e.msg == f"DID NOT RAISE {repr(ValueEr... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 139 | raises | ref | function | with pytest.raises((KeyError, ValueError)):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 142 | test_no_raise_message | def | function | def test_no_raise_message(self) -> None:
try:
pytest.raises(ValueError, int, "0")
except pytest.fail.Exception as e:
assert e.msg == f"DID NOT RAISE {repr(ValueError)}"
else:
assert _False, "Expected pytest.raises.Exception"
try:
with ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 144 | raises | ref | function | pytest.raises(ValueError, int, "0")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 151 | raises | ref | function | with pytest.raises(ValueError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 158 | parametrize | ref | function | @pytest.mark.parametrize("method", ["function", "function_match", "with"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 159 | test_raises_cyclic_reference | def | function | def test_raises_cyclic_reference(self, method):
"""Ensure pytest.raises does not leave a reference cycle (#1965)."""
import gc
class T:
def __call__(self):
raise ValueError
t = T()
refcount = len(gc.get_referrers(t))
if method == "functi... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 163 | T | def | class | __call__ |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 164 | __call__ | def | function | def __call__(self):
pass
try:
pytest.raises(ValueError, A())
except pytest.fail.Exception:
pass
def test_raises_falsey_type_error(self) -> None:
with pytest.raises(TypeError):
with pytest.raises(AssertionError, match=0): # ty... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 167 | T | ref | function | t = T()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 171 | raises | ref | function | pytest.raises(ValueError, t)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 173 | raises | ref | function | pytest.raises(ValueError, t).match("^$")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 175 | raises | ref | function | with pytest.raises(ValueError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 176 | t | ref | function | t()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 183 | test_raises_match | def | function | def test_raises_match(self) -> None:
msg = r"with base \d+"
with pytest.raises(ValueError, match=msg):
int("asdf")
msg = "with base 10"
with pytest.raises(ValueError, match=msg):
int("asdf")
msg = "with base 16"
expr = "Regex pattern {!r} doe... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 185 | raises | ref | function | with pytest.raises(ValueError, match=msg):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 189 | raises | ref | function | with pytest.raises(ValueError, match=msg):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 196 | raises | ref | function | with pytest.raises(AssertionError, match=re.escape(expr)):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 197 | raises | ref | function | with pytest.raises(ValueError, match=msg):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 201 | raises | ref | function | pytest.raises(ValueError, int, "asdf").match("invalid literal")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 202 | raises | ref | function | with pytest.raises(AssertionError) as excinfo:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 203 | raises | ref | function | pytest.raises(ValueError, int, "asdf").match(msg)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 206 | raises | ref | function | pytest.raises(TypeError, int, match="invalid")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 208 | tfunc | def | function | def tfunc(match):
raise ValueError(f"match={match}")
pytest.raises(ValueError, tfunc, match="asdf").match("match=asdf")
pytest.raises(ValueError, tfunc, match="").match("match=")
def test_match_failure_string_quoting(self):
with pytest.raises(AssertionError) as excinfo:... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 211 | raises | ref | function | pytest.raises(ValueError, tfunc, match="asdf").match("match=asdf")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 212 | raises | ref | function | pytest.raises(ValueError, tfunc, match="").match("match=")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 214 | test_match_failure_string_quoting | def | function | def test_match_failure_string_quoting(self):
with pytest.raises(AssertionError) as excinfo:
with pytest.raises(AssertionError, match="'foo"):
raise AssertionError("'bar")
(msg,) = excinfo.value.args
assert msg == 'Regex pattern "\'foo" does not match "\'bar".'
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 215 | raises | ref | function | with pytest.raises(AssertionError) as excinfo:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 216 | raises | ref | function | with pytest.raises(AssertionError, match="'foo"):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 221 | test_match_failure_exact_string_message | def | function | def test_match_failure_exact_string_message(self):
message = "Oh here is a message with (42) numbers in parameters"
with pytest.raises(AssertionError) as excinfo:
with pytest.raises(AssertionError, match=message):
raise AssertionError(message)
(msg,) = excinfo.val... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 223 | raises | ref | function | with pytest.raises(AssertionError) as excinfo:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 224 | raises | ref | function | with pytest.raises(AssertionError, match=message):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 233 | test_raises_match_wrong_type | def | function | def test_raises_match_wrong_type(self):
"""Raising an exception with the wrong type and match= given.
pytest should throw the unexpected exception - the pattern match is not
really relevant if we got a different exception.
"""
with pytest.raises(ValueError):
with... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 239 | raises | ref | function | with pytest.raises(ValueError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 240 | raises | ref | function | with pytest.raises(IndexError, match="nomatch"):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 243 | test_raises_exception_looks_iterable | def | function | def test_raises_exception_looks_iterable(self):
class Meta(type):
def __getitem__(self, item):
return 1 / 0
def __len__(self):
return 1
class ClassLooksIterableException(Exception, metaclass=Meta):
pass
with pytest.raises... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 244 | Meta | def | class | __getitem__ __len__ |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 251 | ClassLooksIterableException | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 254 | raises | ref | function | with pytest.raises(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 258 | raises | ref | function | pytest.raises(ClassLooksIterableException, lambda: None)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 260 | test_raises_with_raising_dunder_class | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 263 | CrappyClass | def | class | __class__ |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 269 | raises | ref | function | with pytest.raises(AssertionError) as excinfo:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 270 | raises | ref | function | with pytest.raises(CrappyClass()): # type: ignore[call-overload]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 270 | CrappyClass | ref | function | with pytest.raises(CrappyClass()): # type: ignore[call-overload]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 274 | test_raises_context_manager_with_kwargs | def | function | def test_raises_context_manager_with_kwargs(self):
with pytest.raises(TypeError) as excinfo:
with pytest.raises(Exception, foo="bar"): # type: ignore[call-overload]
pass
assert "Unexpected keyword arguments" in str(excinfo.value)
def test_expected_exception_is_not_a... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 275 | raises | ref | function | with pytest.raises(TypeError) as excinfo:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 276 | raises | ref | function | with pytest.raises(Exception, foo="bar"): # type: ignore[call-overload]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 280 | test_expected_exception_is_not_a_baseexception | def | function | def test_expected_exception_is_not_a_baseexception(self) -> None:
with pytest.raises(TypeError) as excinfo:
with pytest.raises("hello"): # type: ignore[call-overload]
pass # pragma: no cover
assert "must be a BaseException type, not str" in str(excinfo.value)
c... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py | testing/python/raises.py | 281 | raises | ref | function | with pytest.raises(TypeError) as excinfo:
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.