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/src/_pytest/capture.py
src/_pytest/capture.py
737
_start
ref
function
self._capture_fixture._start()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
739
deactivate_fixture
def
function
def deactivate_fixture(self) -> None: """Deactivate the ``capsys`` or ``capfd`` fixture of this item, if any.""" if self._capture_fixture: self._capture_fixture.close() def suspend_fixture(self) -> None: if self._capture_fixture: self._capture_fixture._suspend() ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
744
suspend_fixture
def
function
def suspend_fixture(self) -> None: if self._capture_fixture: self._capture_fixture._suspend() def resume_fixture(self) -> None: if self._capture_fixture: self._capture_fixture._resume() # Helper context managers @contextlib.contextmanager def global_and_fix...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
746
_suspend
ref
function
self._capture_fixture._suspend()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
748
resume_fixture
def
function
def resume_fixture(self) -> None: if self._capture_fixture: self._capture_fixture._resume() # Helper context managers @contextlib.contextmanager def global_and_fixture_disabled(self) -> Generator[None, None, None]: """Context manager to temporarily disable global and curren...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
750
_resume
ref
function
self._capture_fixture._resume()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
755
global_and_fixture_disabled
def
function
def global_and_fixture_disabled(self) -> Generator[None, None, None]: """Context manager to temporarily disable global and current fixture capturing.""" do_fixture = self._capture_fixture and self._capture_fixture._is_started() if do_fixture: self.suspend_fixture() do_glo...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
757
_is_started
ref
function
do_fixture = self._capture_fixture and self._capture_fixture._is_started()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
759
suspend_fixture
ref
function
self.suspend_fixture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
760
is_started
ref
function
do_global = self._global_capturing and self._global_capturing.is_started()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
762
suspend_global_capture
ref
function
self.suspend_global_capture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
767
resume_global_capture
ref
function
self.resume_global_capture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
769
resume_fixture
ref
function
self.resume_fixture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
772
item_capture
def
function
def item_capture(self, when: str, item: Item) -> Generator[None, None, None]: self.resume_global_capture() self.activate_fixture() try: yield finally: self.deactivate_fixture() self.suspend_global_capture(in_=_False) out, err = self.read_g...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
773
resume_global_capture
ref
function
self.resume_global_capture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
774
activate_fixture
ref
function
self.activate_fixture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
778
deactivate_fixture
ref
function
self.deactivate_fixture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
779
suspend_global_capture
ref
function
self.suspend_global_capture(in_=False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
781
read_global_capture
ref
function
out, err = self.read_global_capture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
782
add_report_section
ref
function
item.add_report_section(when, "stdout", out)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
783
add_report_section
ref
function
item.add_report_section(when, "stderr", err)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
787
hookimpl
ref
function
@hookimpl(hookwrapper=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
788
pytest_make_collect_report
def
function
def pytest_make_collect_report(self, collector: Collector): if isinstance(collector, File): self.resume_global_capture() outcome = yield self.suspend_global_capture() out, err = self.read_global_capture() rep = outcome.get_result() if o...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
790
resume_global_capture
ref
function
self.resume_global_capture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
792
suspend_global_capture
ref
function
self.suspend_global_capture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
793
read_global_capture
ref
function
out, err = self.read_global_capture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
794
get_result
ref
function
rep = outcome.get_result()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
802
hookimpl
ref
function
@hookimpl(hookwrapper=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
803
pytest_runtest_setup
def
function
def pytest_runtest_setup(self, item: Item) -> Generator[None, None, None]: with self.item_capture("setup", item): yield @hookimpl(hookwrapper=_True) def pytest_runtest_call(self, item: Item) -> Generator[None, None, None]: with self.item_capture("call", item): yield ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
804
item_capture
ref
function
with self.item_capture("setup", item):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
807
hookimpl
ref
function
@hookimpl(hookwrapper=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
808
pytest_runtest_call
def
function
def pytest_runtest_call(self, item: Item) -> Generator[None, None, None]: with self.item_capture("call", item): yield @hookimpl(hookwrapper=_True) def pytest_runtest_teardown(self, item: Item) -> Generator[None, None, None]: with self.item_capture("teardown", item): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
809
item_capture
ref
function
with self.item_capture("call", item):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
812
hookimpl
ref
function
@hookimpl(hookwrapper=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
813
pytest_runtest_teardown
def
function
def pytest_runtest_teardown(self, item: Item) -> Generator[None, None, None]: with self.item_capture("teardown", item): yield @hookimpl(tryfirst=_True) def pytest_keyboard_interrupt(self) -> None: self.stop_global_capturing() @hookimpl(tryfirst=_True) def pytest_interna...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
814
item_capture
ref
function
with self.item_capture("teardown", item):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
817
hookimpl
ref
function
@hookimpl(tryfirst=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
818
pytest_keyboard_interrupt
def
function
def pytest_keyboard_interrupt(self) -> None: self.stop_global_capturing() @hookimpl(tryfirst=_True) def pytest_internalerror(self) -> None: self.stop_global_capturing()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
819
stop_global_capturing
ref
function
self.stop_global_capturing()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
821
hookimpl
ref
function
@hookimpl(tryfirst=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
822
pytest_internalerror
def
function
def pytest_internalerror(self) -> None: self.stop_global_capturing()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
823
stop_global_capturing
ref
function
self.stop_global_capturing()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
826
CaptureFixture
def
class
__init__ _start close readouterr _suspend _resume _is_started disabled
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
833
check_ispytest
ref
function
check_ispytest(_ispytest)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
840
_start
def
function
def _start(self) -> None: if self._capture is None: self._capture = MultiCapture( in_=None, out=self.captureclass(1), err=self.captureclass(2), ) self._capture.start_capturing() def close(self) -> None: if self....
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
842
MultiCapture
ref
function
self._capture = MultiCapture(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
844
captureclass
ref
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
845
captureclass
ref
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
847
start_capturing
ref
function
self._capture.start_capturing()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
851
pop_outerr_to_orig
ref
function
out, err = self._capture.pop_outerr_to_orig()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
854
stop_capturing
ref
function
self._capture.stop_capturing()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
857
readouterr
def
function
def readouterr(self) -> CaptureResult[AnyStr]: out = self.out.snap() if self.out else "" err = self.err.snap() if self.err else "" return CaptureResult(out, err)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
867
readouterr
ref
function
out, err = self._capture.readouterr()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
872
CaptureResult
ref
function
return CaptureResult(captured_out, captured_err)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
874
_suspend
def
function
def _suspend(self) -> None: """Suspend this fixture's own capturing temporarily.""" if self._capture is not None: self._capture.suspend_capturing() def _resume(self) -> None: """Resume this fixture's own capturing temporarily.""" if self._capture is not None: ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
877
suspend_capturing
ref
function
self._capture.suspend_capturing()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
879
_resume
def
function
def _resume(self) -> None: """Resume this fixture's own capturing temporarily.""" if self._capture is not None: self._capture.resume_capturing() def _is_started(self) -> bool: """Whether actively capturing -- not disabled or closed.""" if self._capture is not None: ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
882
resume_capturing
ref
function
self._capture.resume_capturing()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
884
_is_started
def
function
def _is_started(self) -> bool: """Whether actively capturing -- not disabled or closed.""" if self._capture is not None: return self._capture.is_started() return _False @contextlib.contextmanager def disabled(self) -> Generator[None, None, None]: """Temporarily d...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
887
is_started
ref
function
return self._capture.is_started()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
891
disabled
def
function
def disabled(self) -> Generator[None, None, None]: """Temporarily disable capturing while inside the ``with`` block.""" capmanager = self.request.config.pluginmanager.getplugin("capturemanager") with capmanager.global_and_fixture_disabled(): yield
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
893
getplugin
ref
function
capmanager = self.request.config.pluginmanager.getplugin("capturemanager")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
894
global_and_fixture_disabled
ref
function
with capmanager.global_and_fixture_disabled():
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
902
capsys
def
function
def capsys(request: SubRequest) -> Generator[CaptureFixture[str], None, None]: """Enable text capturing of writes to ``sys.stdout`` and ``sys.stderr``. The captured output is made available via ``capsys.readouterr()`` method calls, which return a ``(out, err)`` namedtuple. ``out`` and ``err`` will be `...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
909
getplugin
ref
function
capman = request.config.pluginmanager.getplugin("capturemanager")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
911
set_fixture
ref
function
capman.set_fixture(capture_fixture)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
912
_start
ref
function
capture_fixture._start()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
915
unset_fixture
ref
function
capman.unset_fixture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
919
capsysbinary
def
function
def capsysbinary(request: SubRequest) -> Generator[CaptureFixture[bytes], None, None]: """Enable bytes capturing of writes to ``sys.stdout`` and ``sys.stderr``. The captured output is made available via ``capsysbinary.readouterr()`` method calls, which return a ``(out, err)`` namedtuple. ``out`` and ``...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
926
getplugin
ref
function
capman = request.config.pluginmanager.getplugin("capturemanager")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
928
set_fixture
ref
function
capman.set_fixture(capture_fixture)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
929
_start
ref
function
capture_fixture._start()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
932
unset_fixture
ref
function
capman.unset_fixture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
936
capfd
def
function
def capfd(request: SubRequest) -> Generator[CaptureFixture[str], None, None]: """Enable text capturing of writes to file descriptors ``1`` and ``2``. The captured output is made available via ``capfd.readouterr()`` method calls, which return a ``(out, err)`` namedtuple. ``out`` and ``err`` will be ``te...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
943
getplugin
ref
function
capman = request.config.pluginmanager.getplugin("capturemanager")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
945
set_fixture
ref
function
capman.set_fixture(capture_fixture)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
946
_start
ref
function
capture_fixture._start()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
949
unset_fixture
ref
function
capman.unset_fixture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
953
capfdbinary
def
function
def capfdbinary(request: SubRequest) -> Generator[CaptureFixture[bytes], None, None]: """Enable bytes capturing of writes to file descriptors ``1`` and ``2``. The captured output is made available via ``capfd.readouterr()`` method calls, which return a ``(out, err)`` namedtuple. ``out`` and ``err`` wil...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
960
getplugin
ref
function
capman = request.config.pluginmanager.getplugin("capturemanager")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
962
set_fixture
ref
function
capman.set_fixture(capture_fixture)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
963
_start
ref
function
capture_fixture._start()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py
src/_pytest/capture.py
966
unset_fixture
ref
function
capman.unset_fixture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
39
legacy_path
def
function
def legacy_path(path: Union[str, "os.PathLike[str]"]) -> LEGACY_PATH: """Internal wrapper to prepare lazy proxies for legacy_path instances""" return LEGACY_PATH(path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
41
LEGACY_PATH
ref
function
return LEGACY_PATH(path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
47
NotSetType
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
58
_format_args
def
function
def _format_args(func: Callable[..., Any]) -> str: return str(signature(func))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
62
is_generator
def
function
def is_generator(func: object) -> bool: genfunc = inspect.isgeneratorfunction(func) return genfunc and not iscoroutinefunction(func)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
79
is_async_function
def
function
def is_async_function(func: object) -> bool: """Return _True if the given function seems to be an async function or an async generator.""" return iscoroutinefunction(func) or inspect.isasyncgenfunction(func)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
85
getlocation
def
function
def getlocation(function, curdir: Optional[str] = None) -> str: function = get_real_func(function) fn = Path(inspect.getfile(function)) lineno = function.__code__.co_firstlineno if curdir is not None: try: relfn = fn.relative_to(curdir) except ValueError: pass ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
86
get_real_func
ref
function
function = get_real_func(function)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
99
num_mock_patch_args
def
function
def num_mock_patch_args(function) -> int: """Return number of arguments used up by mock arguments (if any).""" patchings = getattr(function, "patchings", None) if not patchings: return 0 mock_sentinel = getattr(sys.modules.get("mock"), "DEFAULT", object()) ut_mock_sentinel = getattr(sys.mod...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
118
getfuncargnames
def
function
def getfuncargnames( function: Callable[..., Any], *, name: str = "", is_method: bool = _False, cls: Optional[type] = None,
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
153
fail
ref
function
fail(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
184
num_mock_patch_args
ref
function
arg_names = arg_names[num_mock_patch_args(function) :]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
199
get_default_arg_names
def
function
def get_default_arg_names(function: Callable[..., Any]) -> Tuple[str, ...]: # Note: this code intentionally mirrors the code at the beginning of # getfuncargnames, to get the arguments which were excluded from its result # because they had default values. return tuple( p.name for p in si...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
219
_translate_non_printable
def
function
def _translate_non_printable(s: str) -> str: return s.translate(_non_printable_ascii_translate_table)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
226
_bytes_to_ascii
def
function
def _bytes_to_ascii(val: bytes) -> str: return val.decode("ascii", "backslashreplace")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
227
decode
ref
function
return val.decode("ascii", "backslashreplace")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py
src/_pytest/compat.py
230
ascii_escaped
def
function
def ascii_escaped(val: Union[bytes, str]) -> str: r"""If val is pure ASCII, return it as an str, otherwise, escape bytes objects into a sequence of escaped bytes: b'\xc3\xb4\xc5\xd6' -> r'\xc3\xb4\xc5\xd6' and escapes unicode objects into a sequence of escaped unicode ids, e.g.: r'4\nV\U00043...