MCPcopy Index your code
hub / github.com/ipython/ipython / _setup_fixtures

Function _setup_fixtures

IPython/testing/plugin/pytest_ipdoctest.py:706–723  ·  view source on GitHub ↗

Used by IPDoctestTextfile and IPDoctestItem to setup fixture information.

(doctest_item: IPDoctestItem)

Source from the content-addressed store, hash-verified

704
705
706def _setup_fixtures(doctest_item: IPDoctestItem) -> FixtureRequest:
707 """Used by IPDoctestTextfile and IPDoctestItem to setup fixture information."""
708
709 def func() -> None:
710 pass
711
712 doctest_item.funcargs = {} # type: ignore[attr-defined]
713 fm = doctest_item.session._fixturemanager
714 kwargs = {"node": doctest_item, "func": func, "cls": None}
715 if pytest_version <= (8, 0):
716 kwargs["funcargs"] = False
717 doctest_item._fixtureinfo = fm.getfixtureinfo( # type: ignore[attr-defined]
718 **kwargs
719 )
720 fixture_request = FixtureRequest(doctest_item, _ispytest=True)
721 if pytest_version <= (8, 0):
722 fixture_request._fillfixtures()
723 return fixture_request
724
725
726def _init_checker_class() -> Type["IPDoctestOutputChecker"]:

Callers 1

setupMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…