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 | 670 | Metafunc | ref | function | metafunc = self.Metafunc(func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 671 | parametrize | ref | function | metafunc.parametrize("x, y", [("a", "b")], indirect=["x", "y"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 675 | test_parametrize_indirect_list_empty | def | function | def test_parametrize_indirect_list_empty(self) -> None:
"""#714"""
def func(x, y):
pass
metafunc = self.Metafunc(func)
metafunc.parametrize("x, y", [("a", "b")], indirect=[])
assert metafunc._calls[0].funcargs == dict(x="a", y="b")
assert metafunc._calls... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 678 | func | def | function | def func(x, y):
pass
metafunc = self.Metafunc(func)
metafunc.parametrize("x", [1, 2])
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
metafunc.parametrize("y", [1, 2])
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 681 | Metafunc | ref | function | metafunc = self.Metafunc(func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 682 | parametrize | ref | function | metafunc.parametrize("x, y", [("a", "b")], indirect=[])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 686 | test_parametrize_indirect_wrong_type | def | function | def test_parametrize_indirect_wrong_type(self) -> None:
def func(x, y):
pass
metafunc = self.Metafunc(func)
with pytest.raises(
fail.Exception,
match="In func: expected Sequence or boolean for indirect, got dict",
):
metafunc.parametri... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 687 | func | def | function | def func(x, y):
pass
metafunc = self.Metafunc(func)
metafunc.parametrize("x", [1, 2])
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
metafunc.parametrize("y", [1, 2])
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 690 | Metafunc | ref | function | metafunc = self.Metafunc(func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 691 | raises | ref | function | with pytest.raises(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 695 | parametrize | ref | function | metafunc.parametrize("x, y", [("a", "b")], indirect={}) # type: ignore[arg-type]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 697 | test_parametrize_indirect_list_functional | def | function | def test_parametrize_indirect_list_functional(self, pytester: Pytester) -> None:
"""
#714
Test parametrization with 'indirect' parameter applied on
particular arguments. As y is direct, its value should
be used directly rather than being passed to the fixture y.
:par... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 707 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 722 | runpytest | ref | function | result = pytester.runpytest("-v")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 723 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*test_simple*a-b*", "*1 passed*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 725 | test_parametrize_indirect_list_error | def | function | def test_parametrize_indirect_list_error(self) -> None:
"""#714"""
def func(x, y):
pass
metafunc = self.Metafunc(func)
with pytest.raises(fail.Exception):
metafunc.parametrize("x, y", [("a", "b")], indirect=["x", "z"])
def test_parametrize_uses_no_fixtu... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 728 | func | def | function | def func(x, y):
pass
metafunc = self.Metafunc(func)
metafunc.parametrize("x", [1, 2])
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
metafunc.parametrize("y", [1, 2])
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 731 | Metafunc | ref | function | metafunc = self.Metafunc(func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 732 | raises | ref | function | with pytest.raises(fail.Exception):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 733 | parametrize | ref | function | metafunc.parametrize("x, y", [("a", "b")], indirect=["x", "z"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 735 | test_parametrize_uses_no_fixture_error_indirect_false | def | function | def test_parametrize_uses_no_fixture_error_indirect_false(
self, pytester: Pytester
) -> None:
"""The 'uses no fixture' error tells the user at collection time
that the parametrize data they've set up doesn't correspond to the
fixtures in their test function, rather than silently... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 745 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 754 | runpytest | ref | function | result = pytester.runpytest("--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 755 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*uses no argument 'y'*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 757 | test_parametrize_uses_no_fixture_error_indirect_true | def | function | def test_parametrize_uses_no_fixture_error_indirect_true(
self, pytester: Pytester
) -> None:
"""#714"""
pytester.makepyfile(
"""
import pytest
@pytest.fixture(scope='function')
def x(request):
return request.param * 3
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 761 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 776 | runpytest | ref | function | result = pytester.runpytest("--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 777 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*uses no fixture 'y'*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 779 | test_parametrize_indirect_uses_no_fixture_error_indirect_string | def | function | def test_parametrize_indirect_uses_no_fixture_error_indirect_string(
self, pytester: Pytester
) -> None:
"""#714"""
pytester.makepyfile(
"""
import pytest
@pytest.fixture(scope='function')
def x(request):
return request.para... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 783 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 795 | runpytest | ref | function | result = pytester.runpytest("--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 796 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*uses no fixture 'y'*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 798 | test_parametrize_indirect_uses_no_fixture_error_indirect_list | def | function | def test_parametrize_indirect_uses_no_fixture_error_indirect_list(
self, pytester: Pytester
) -> None:
"""#714"""
pytester.makepyfile(
"""
import pytest
@pytest.fixture(scope='function')
def x(request):
return request.param ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 802 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 814 | runpytest | ref | function | result = pytester.runpytest("--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 815 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*uses no fixture 'y'*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 817 | test_parametrize_argument_not_in_indirect_list | def | function | def test_parametrize_argument_not_in_indirect_list(
self, pytester: Pytester
) -> None:
"""#714"""
pytester.makepyfile(
"""
import pytest
@pytest.fixture(scope='function')
def x(request):
return request.param * 3
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 821 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 833 | runpytest | ref | function | result = pytester.runpytest("--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 834 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*uses no argument 'y'*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 836 | test_parametrize_gives_indicative_error_on_function_with_default_argument | def | function | def test_parametrize_gives_indicative_error_on_function_with_default_argument(
self, pytester: Pytester
) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.mark.parametrize('x, y', [('a', 'b')])
def test_simple(x, y=1):
asser... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 839 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 848 | runpytest | ref | function | result = pytester.runpytest("--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 849 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 853 | test_parametrize_functional | def | function | def test_parametrize_functional(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
def pytest_generate_tests(metafunc):
metafunc.parametrize('x', [1,2], indirect=_True)
metafunc.parametrize('y', [2])
@pyte... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 854 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 869 | runpytest | ref | function | result = pytester.runpytest("-v")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 870 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 874 | test_parametrize_onearg | def | function | def test_parametrize_onearg(self) -> None:
metafunc = self.Metafunc(lambda x: None)
metafunc.parametrize("x", [1, 2])
assert len(metafunc._calls) == 2
assert metafunc._calls[0].funcargs == dict(x=1)
assert metafunc._calls[0].id == "1"
assert metafunc._calls[1].funcarg... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 875 | Metafunc | ref | function | metafunc = self.Metafunc(lambda x: None)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 876 | parametrize | ref | function | metafunc.parametrize("x", [1, 2])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 883 | test_parametrize_onearg_indirect | def | function | def test_parametrize_onearg_indirect(self) -> None:
metafunc = self.Metafunc(lambda x: None)
metafunc.parametrize("x", [1, 2], indirect=_True)
assert metafunc._calls[0].params == dict(x=1)
assert metafunc._calls[0].id == "1"
assert metafunc._calls[1].params == dict(x=2)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 884 | Metafunc | ref | function | metafunc = self.Metafunc(lambda x: None)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 885 | parametrize | ref | function | metafunc.parametrize("x", [1, 2], indirect=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 891 | test_parametrize_twoargs | def | function | def test_parametrize_twoargs(self) -> None:
metafunc = self.Metafunc(lambda x, y: None)
metafunc.parametrize(("x", "y"), [(1, 2), (3, 4)])
assert len(metafunc._calls) == 2
assert metafunc._calls[0].funcargs == dict(x=1, y=2)
assert metafunc._calls[0].id == "1-2"
asser... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 892 | Metafunc | ref | function | metafunc = self.Metafunc(lambda x, y: None)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 893 | parametrize | ref | function | metafunc.parametrize(("x", "y"), [(1, 2), (3, 4)])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 900 | test_parametrize_multiple_times | def | function | def test_parametrize_multiple_times(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
pytestmark = pytest.mark.parametrize("x", [1,2])
def test_func(x):
assert 0, x
class TestClass(object):
py... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 901 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 913 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 915 | assert_outcomes | ref | function | result.assert_outcomes(failed=6)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 917 | test_parametrize_CSV | def | function | def test_parametrize_CSV(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.mark.parametrize("x, y,", [(1,2), (2,3)])
def test_func(x, y):
assert x+1 == y
"""
)
reprec = pytester.inline_run... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 918 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 926 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 927 | assertoutcome | ref | function | reprec.assertoutcome(passed=2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 929 | test_parametrize_class_scenarios | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 930 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 957 | runpytest | ref | function | result = pytester.runpytest("-v")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 959 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 971 | test_format_args | def | function | def test_format_args(self) -> None:
def function1():
pass
assert _format_args(function1) == "()"
def function2(arg1):
pass
assert _format_args(function2) == "(arg1)"
def function3(arg1, arg2="qwe"):
pass
assert _format_args(fun... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 972 | function1 | def | function | def function1():
pass
assert _format_args(function1) == "()"
def function2(arg1):
pass
assert _format_args(function2) == "(arg1)"
def function3(arg1, arg2="qwe"):
pass
assert _format_args(function3) == "(arg1, arg2='qwe')"
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 975 | _format_args | ref | function | assert _format_args(function1) == "()"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 977 | function2 | def | function | def function2(arg1):
pass
assert _format_args(function2) == "(arg1)"
def function3(arg1, arg2="qwe"):
pass
assert _format_args(function3) == "(arg1, arg2='qwe')"
def function4(arg1, *args, **kwargs):
pass
assert _format_args(functi... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 980 | _format_args | ref | function | assert _format_args(function2) == "(arg1)"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 982 | function3 | def | function | def function3(arg1, arg2="qwe"):
pass
assert _format_args(function3) == "(arg1, arg2='qwe')"
def function4(arg1, *args, **kwargs):
pass
assert _format_args(function4) == "(arg1, *args, **kwargs)"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 985 | _format_args | ref | function | assert _format_args(function3) == "(arg1, arg2='qwe')"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 987 | function4 | def | function | def function4(arg1, *args, **kwargs):
pass
assert _format_args(function4) == "(arg1, *args, **kwargs)"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 990 | _format_args | ref | function | assert _format_args(function4) == "(arg1, *args, **kwargs)"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 993 | TestMetafuncFunctional | def | class | test_attributes test_two_functions test_noself_in_method test_generate_tests_in_class test_two_functions_not_same_instance test_issue28_setup_method_in_generate_tests test_parametrize_functional2 test_parametrize_and_inner_getfixturevalue test_parametrize_on_setup_arg test_parametrize_with_ids test_parametrize_without_... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 994 | test_attributes | def | function | def test_attributes(self, pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
# assumes that generate/provide runs in the same process
import sys, pytest
def pytest_generate_tests(metafunc):
metafunc.parametrize('metafunc', [metafunc])
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 995 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,021 | runpytest | ref | function | result = pytester.runpytest(p, "-v")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,022 | assert_outcomes | ref | function | result.assert_outcomes(passed=2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,024 | test_two_functions | def | function | def test_two_functions(self, pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
def pytest_generate_tests(metafunc):
metafunc.parametrize('arg1', [10, 20], ids=['0', '1'])
def test_func1(arg1):
assert arg1 == 10
def tes... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,025 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,037 | runpytest | ref | function | result = pytester.runpytest("-v", p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,038 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,048 | test_noself_in_method | def | function | def test_noself_in_method(self, pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
def pytest_generate_tests(metafunc):
assert 'xyz' not in metafunc.fixturenames
class TestHello(object):
def test_hello(xyz):
pass... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,049 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,059 | runpytest | ref | function | result = pytester.runpytest(p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,060 | 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,062 | test_generate_tests_in_class | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,063 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,073 | runpytest | ref | function | result = pytester.runpytest("-v", p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,074 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*test_myfunc*hello*PASS*", "*1 passed*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,076 | test_two_functions_not_same_instance | def | function | def test_two_functions_not_same_instance(self, pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
def pytest_generate_tests(metafunc):
metafunc.parametrize('arg1', [10, 20], ids=["0", "1"])
class TestClass(object):
def test_func(sel... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,077 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,088 | runpytest | ref | function | result = pytester.runpytest("-v", p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,089 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 1,093 | test_issue28_setup_method_in_generate_tests | def | function | def test_issue28_setup_method_in_generate_tests(self, pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
def pytest_generate_tests(metafunc):
metafunc.parametrize('arg1', [1])
class TestClass(object):
def test_method(self, arg1):
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.