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/python/metafunc.py
testing/python/metafunc.py
1,567
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,595
runpytest
ref
function
result = pytester.runpytest("-s")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,601
TestMarkersWithParametrization
def
class
test_simple_mark test_select_based_on_mark test_simple_xfail test_simple_xfail_single_argname test_xfail_with_arg test_xfail_with_kwarg test_xfail_with_arg_and_kwarg test_xfail_passing_is_xpass test_parametrize_called_in_generate_tests test_parametrize_ID_generation_string_int_works test_parametrize_marked_value test_p...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,604
test_simple_mark
def
function
def test_simple_mark(self, pytester: Pytester) -> None: s = """ import pytest @pytest.mark.foo @pytest.mark.parametrize(("n", "expected"), [ (1, 2), pytest.param(1, 3, marks=pytest.mark.bar), (2, 3), ]) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,617
getitems
ref
function
items = pytester.getitems(s)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,625
test_select_based_on_mark
def
function
def test_select_based_on_mark(self, pytester: Pytester) -> None: s = """ import pytest @pytest.mark.parametrize(("n", "expected"), [ (1, 2), pytest.param(2, 3, marks=pytest.mark.foo), (3, 4), ]) def test_increme...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,637
makepyfile
ref
function
pytester.makepyfile(s)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,638
inline_run
ref
function
rec = pytester.inline_run("-m", "foo")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,639
listoutcomes
ref
function
passed, skipped, fail = rec.listoutcomes()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,644
test_simple_xfail
def
function
def test_simple_xfail(self, pytester: Pytester) -> None: s = """ import pytest @pytest.mark.parametrize(("n", "expected"), [ (1, 2), pytest.param(1, 3, marks=pytest.mark.xfail), (2, 3), ]) def test_increment(n, ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,656
makepyfile
ref
function
pytester.makepyfile(s)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,657
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,659
assertoutcome
ref
function
reprec.assertoutcome(passed=2, skipped=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,661
test_simple_xfail_single_argname
def
function
def test_simple_xfail_single_argname(self, pytester: Pytester) -> None: s = """ import pytest @pytest.mark.parametrize("n", [ 2, pytest.param(3, marks=pytest.mark.xfail), 4, ]) def test_isEven(n): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,673
makepyfile
ref
function
pytester.makepyfile(s)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,674
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,675
assertoutcome
ref
function
reprec.assertoutcome(passed=2, skipped=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,677
test_xfail_with_arg
def
function
def test_xfail_with_arg(self, pytester: Pytester) -> None: s = """ import pytest @pytest.mark.parametrize(("n", "expected"), [ (1, 2), pytest.param(1, 3, marks=pytest.mark.xfail("_True")), (2, 3), ]) def test_in...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,689
makepyfile
ref
function
pytester.makepyfile(s)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,690
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,691
assertoutcome
ref
function
reprec.assertoutcome(passed=2, skipped=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,693
test_xfail_with_kwarg
def
function
def test_xfail_with_kwarg(self, pytester: Pytester) -> None: s = """ import pytest @pytest.mark.parametrize(("n", "expected"), [ (1, 2), pytest.param(1, 3, marks=pytest.mark.xfail(reason="some bug")), (2, 3), ]) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,705
makepyfile
ref
function
pytester.makepyfile(s)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,706
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,707
assertoutcome
ref
function
reprec.assertoutcome(passed=2, skipped=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,709
test_xfail_with_arg_and_kwarg
def
function
def test_xfail_with_arg_and_kwarg(self, pytester: Pytester) -> None: s = """ import pytest @pytest.mark.parametrize(("n", "expected"), [ (1, 2), pytest.param(1, 3, marks=pytest.mark.xfail("_True", reason="some bug")), (2, 3), ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,721
makepyfile
ref
function
pytester.makepyfile(s)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,722
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,723
assertoutcome
ref
function
reprec.assertoutcome(passed=2, skipped=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,725
parametrize
ref
function
@pytest.mark.parametrize("strict", [True, False])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,726
test_xfail_passing_is_xpass
def
function
def test_xfail_passing_is_xpass(self, pytester: Pytester, strict: bool) -> None: s = """ import pytest m = pytest.mark.xfail("sys.version_info > (0, 0, 0)", reason="some bug", strict={strict}) @pytest.mark.parametrize(("n", "expected"), [ (1, 2), ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,742
makepyfile
ref
function
pytester.makepyfile(s)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,743
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,745
assertoutcome
ref
function
reprec.assertoutcome(passed=passed, failed=failed)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,747
test_parametrize_called_in_generate_tests
def
function
def test_parametrize_called_in_generate_tests(self, pytester: Pytester) -> None: s = """ import pytest def pytest_generate_tests(metafunc): passingTestData = [(1, 2), (2, 3)] failingTestData = [(1, 3), ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,766
makepyfile
ref
function
pytester.makepyfile(s)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,767
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,768
assertoutcome
ref
function
reprec.assertoutcome(passed=2, skipped=2)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,770
test_parametrize_ID_generation_string_int_works
def
function
def test_parametrize_ID_generation_string_int_works( self, pytester: Pytester ) -> None: """#290""" pytester.makepyfile( """ import pytest @pytest.fixture def myfixture(): return 'example' @pytest.mark.parametri...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,774
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,787
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,788
assertoutcome
ref
function
reprec.assertoutcome(passed=2)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,790
parametrize
ref
function
@pytest.mark.parametrize("strict", [True, False])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,791
test_parametrize_marked_value
def
function
def test_parametrize_marked_value(self, pytester: Pytester, strict: bool) -> None: s = """ import pytest @pytest.mark.parametrize(("n", "expected"), [ pytest.param( 2,3, marks=pytest.mark.xfail("sys.version_info > (0, 0, 0)", r...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,810
makepyfile
ref
function
pytester.makepyfile(s)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,811
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,813
assertoutcome
ref
function
reprec.assertoutcome(passed=passed, failed=failed)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,815
test_pytest_make_parametrize_id
def
function
def test_pytest_make_parametrize_id(self, pytester: Pytester) -> None: pytester.makeconftest( """ def pytest_make_parametrize_id(config, val): return str(val * 2) """ ) pytester.makepyfile( """ import pytest ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,816
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,822
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,831
runpytest
ref
function
result = pytester.runpytest("-v")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,832
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*test_func*0*PASS*", "*test_func*2*PASS*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,834
test_pytest_make_parametrize_id_with_argname
def
function
def test_pytest_make_parametrize_id_with_argname(self, pytester: Pytester) -> None: pytester.makeconftest( """ def pytest_make_parametrize_id(config, val, argname): return str(val * 2 if argname == 'x' else val * 10) """ ) pytester.makepyfile( ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,835
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,841
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,854
runpytest
ref
function
result = pytester.runpytest("-v")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,855
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,859
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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,860
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,869
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,870
assert_outcomes
ref
function
result.assert_outcomes(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,872
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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,873
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,895
runpytest
ref
function
result = pytester.runpytest("-vv", "-s")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py
testing/python/metafunc.py
1,896
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
10
raises
ref
function
with pytest.raises(TypeError, match=r".* must be callable"):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
11
raises
ref
function
pytest.raises(RuntimeError, "int('qwe')") # type: ignore[call-overload]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
14
raises
ref
function
excinfo = pytest.raises(ValueError, int, "qwe")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
18
raises
ref
function
excinfo = pytest.raises(ValueError, int, "hello")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
22
A
def
class
__call__
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
27
raises
ref
function
pytest.raises(ValueError, A())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
27
A
ref
function
pytest.raises(ValueError, A())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
32
raises
ref
function
with pytest.raises(TypeError):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
33
raises
ref
function
with pytest.raises(AssertionError, match=0): # type: ignore[call-overload]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
39
E
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
42
raises
ref
function
with pytest.raises(E) as excinfo:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
51
E
ref
function
raise E()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
54
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
78
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
79
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*3 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
82
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
103
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
104
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*4 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
107
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
126
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
127
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*2 failed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
129
test_noclass
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
130
raises
ref
function
with pytest.raises(TypeError):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py
testing/python/raises.py
131
raises
ref
function
pytest.raises("wrong", lambda: None) # type: ignore[call-overload]