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/fixtures.py | testing/python/fixtures.py | 1,056 | test_show_fixtures_color_yes | def | function | def test_show_fixtures_color_yes(self, pytester: Pytester) -> None:
pytester.makepyfile("def test_this(): assert 1")
result = pytester.runpytest("--color=yes", "--fixtures")
assert "\x1b[32mtmp_path" in result.stdout.str()
def test_newstyle_with_request(self, pytester: Pytester) -> None... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,057 | makepyfile | ref | function | pytester.makepyfile("def test_this(): assert 1")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,058 | runpytest | ref | function | result = pytester.runpytest("--color=yes", "--fixtures")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,061 | test_newstyle_with_request | def | function | def test_newstyle_with_request(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.fixture()
def arg(request):
pass
def test_1(arg):
pass
"""
)
reprec = pytester.... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,062 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,072 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,073 | assertoutcome | ref | function | reprec.assertoutcome(passed=1)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,075 | test_setupcontext_no_param | def | function | def test_setupcontext_no_param(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.fixture(params=[1,2])
def arg(request):
return request.param
@pytest.fixture(autouse=_True)
def mysetup(re... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,076 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,090 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,091 | assertoutcome | ref | function | reprec.assertoutcome(passed=2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,094 | TestRequestSessionScoped | def | class | session_request test_session_scoped_unavailable_attributes |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,095 | fixture | ref | function | @pytest.fixture(scope="session")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,096 | session_request | def | function | def session_request(self, request):
return request
@pytest.mark.parametrize("name", ["path", "module"])
def test_session_scoped_unavailable_attributes(self, session_request, name):
with pytest.raises(
AttributeError,
match=f"{name} not available in session-scoped con... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,099 | parametrize | ref | function | @pytest.mark.parametrize("name", ["path", "module"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,100 | test_session_scoped_unavailable_attributes | def | function | def test_session_scoped_unavailable_attributes(self, session_request, name):
with pytest.raises(
AttributeError,
match=f"{name} not available in session-scoped context",
):
getattr(session_request, name)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,101 | raises | ref | function | with pytest.raises(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,108 | TestRequestMarking | def | class | test_applymarker test_accesskeywords test_accessmarker_dynamic |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,109 | test_applymarker | def | function | def test_applymarker(self, pytester: Pytester) -> None:
item1, item2 = pytester.getitems(
"""
import pytest
@pytest.fixture
def something(request):
pass
class TestClass(object):
def test_func1(self, something):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,110 | getitems | ref | function | item1, item2 = pytester.getitems(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,124 | FixtureRequest | ref | function | req1 = fixtures.FixtureRequest(item1, _ispytest=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,126 | applymarker | ref | function | req1.applymarker(pytest.mark.xfail)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,129 | applymarker | ref | function | req1.applymarker(pytest.mark.skipif)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,131 | raises | ref | function | with pytest.raises(ValueError):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,132 | applymarker | ref | function | req1.applymarker(42) # type: ignore[arg-type]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,134 | test_accesskeywords | def | function | def test_accesskeywords(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.fixture()
def keywords(request):
return request.keywords
@pytest.mark.XYZ
def test_function(keywords):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,135 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,147 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,148 | assertoutcome | ref | function | reprec.assertoutcome(passed=1)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,150 | test_accessmarker_dynamic | def | function | def test_accessmarker_dynamic(self, pytester: Pytester) -> None:
pytester.makeconftest(
"""
import pytest
@pytest.fixture()
def keywords(request):
return request.keywords
@pytest.fixture(scope="class", autouse=_True)
de... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,151 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,163 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,174 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,175 | assertoutcome | ref | function | reprec.assertoutcome(passed=2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,178 | TestFixtureUsages | def | class | test_noargfixturedec test_receives_funcargs test_receives_funcargs_scope_mismatch test_receives_funcargs_scope_mismatch_issue660 test_invalid_scope test_parameters_without_eq_semantics test_funcarg_parametrized_and_used_twice test_factory_uses_unknown_funcarg_as_dependency_error test_factory_setup_as_classes_fails test... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,179 | test_noargfixturedec | def | function | def test_noargfixturedec(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.fixture
def arg1():
return 1
def test_func(arg1):
assert arg1 == 1
"""
)
reprec = py... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,180 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,191 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,192 | assertoutcome | ref | function | reprec.assertoutcome(passed=1)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,194 | test_receives_funcargs | def | function | def test_receives_funcargs(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.fixture()
def arg1():
return 1
@pytest.fixture()
def arg2(arg1):
return arg1 + 1
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,195 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,213 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,214 | assertoutcome | ref | function | reprec.assertoutcome(passed=2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,216 | test_receives_funcargs_scope_mismatch | def | function | def test_receives_funcargs_scope_mismatch(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.fixture(scope="function")
def arg1():
return 1
@pytest.fixture(scope="module")
def arg2(arg1):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,217 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,232 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,233 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,242 | test_receives_funcargs_scope_mismatch_issue660 | def | function | def test_receives_funcargs_scope_mismatch_issue660(
self, pytester: Pytester
) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.fixture(scope="function")
def arg1():
return 1
@pytest.fixture(scope="module")
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,245 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,260 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,261 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,265 | test_invalid_scope | def | function | def test_invalid_scope(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.fixture(scope="functions")
def badscope():
pass
def test_nothing(badscope):
pass
"""
)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,266 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,277 | runpytest_inprocess | ref | function | result = pytester.runpytest_inprocess()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,278 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,282 | parametrize | ref | function | @pytest.mark.parametrize("scope", ["function", "session"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,283 | test_parameters_without_eq_semantics | def | function | def test_parameters_without_eq_semantics(self, scope, pytester: Pytester) -> None:
pytester.makepyfile(
"""
class NoEq1: # fails on `a == b` statement
def __eq__(self, _):
raise RuntimeError
class NoEq2: # fails on `if a == b:` state... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,284 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,311 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,312 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*4 passed*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,314 | test_funcarg_parametrized_and_used_twice | def | function | def test_funcarg_parametrized_and_used_twice(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
values = []
@pytest.fixture(params=[1,2])
def arg1(request):
values.append(1)
return request.para... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,315 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,333 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,334 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*2 passed*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,336 | test_factory_uses_unknown_funcarg_as_dependency_error | def | function | def test_factory_uses_unknown_funcarg_as_dependency_error(
self, pytester: Pytester
) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.fixture()
def fail(missing):
return
@pytest.fixture()
def call_f... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,339 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,355 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,356 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,366 | test_factory_setup_as_classes_fails | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,367 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,377 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,378 | getfailedcollections | ref | function | values = reprec.getfailedcollections()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,381 | test_usefixtures_marker | def | function | def test_usefixtures_marker(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
values = []
@pytest.fixture(scope="class")
def myfix(request):
request.cls.hello = "world"
values.append(1)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,382 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,403 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,404 | assertoutcome | ref | function | reprec.assertoutcome(passed=2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,406 | test_usefixtures_ini | def | function | def test_usefixtures_ini(self, pytester: Pytester) -> None:
pytester.makeini(
"""
[pytest]
usefixtures = myfix
"""
)
pytester.makeconftest(
"""
import pytest
@pytest.fixture(scope="class")
def myfix(... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,407 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,413 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,423 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,432 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,433 | assertoutcome | ref | function | reprec.assertoutcome(passed=2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,435 | test_usefixtures_seen_in_showmarkers | def | function | def test_usefixtures_seen_in_showmarkers(self, pytester: Pytester) -> None:
result = pytester.runpytest("--markers")
result.stdout.fnmatch_lines(
"""
*usefixtures(fixturename1*mark tests*fixtures*
"""
)
def test_request_instance_issue203(self, pytester: P... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,436 | runpytest | ref | function | result = pytester.runpytest("--markers")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,437 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,443 | test_request_instance_issue203 | def | function | def test_request_instance_issue203(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
class TestClass(object):
@pytest.fixture
def setup1(self, request):
assert self == request.instance
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,444 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,457 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,458 | assertoutcome | ref | function | reprec.assertoutcome(passed=1)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,460 | test_fixture_parametrized_with_iterator | def | function | def test_fixture_parametrized_with_iterator(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
values = []
def f():
yield 1
yield 2
dec = pytest.fixture(scope="module", params=f())
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,461 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,484 | inline_run | ref | function | reprec = pytester.inline_run("-v")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,485 | assertoutcome | ref | function | reprec.assertoutcome(passed=4)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,486 | getcalls | ref | function | values = reprec.getcalls("pytest_runtest_call")[0].item.module.values
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,489 | test_setup_functions_as_fixtures | def | function | def test_setup_functions_as_fixtures(self, pytester: Pytester) -> None:
"""Ensure setup_* methods obey fixture scope rules (#517, #3094)."""
pytester.makepyfile(
"""
import pytest
DB_INITIALIZED = None
@pytest.fixture(scope="session", autouse=_True)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,491 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,525 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,526 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 2 passed in *"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,529 | TestFixtureManagerParseFactories | def | class | pytester test_parsefactories_evil_objects_issue214 test_parsefactories_conftest test_parsefactories_conftest_and_module_and_class test_parsefactories_relative_node_ids test_package_xunit_fixture test_package_fixture_complex test_collect_custom_items |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/fixtures.py | testing/python/fixtures.py | 1,531 | pytester | def | function | def pytester(self, pytester: Pytester) -> Pytester:
pytester.makeconftest(
"""
import pytest
@pytest.fixture
def hello(request):
return "conftest"
@pytest.fixture
def fm(request):
return request._fixtur... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.