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 | 334 | SysCapture | def | class | snap writeorg |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 337 | snap | def | function | def snap(self):
self._assert_state("snap", ("started", "suspended"))
self.tmpfile.seek(0)
res = self.tmpfile.buffer.read()
self.tmpfile.seek(0)
self.tmpfile.truncate()
return res
def done(self) -> None:
self._assert_state("done", ("initialized", "started"... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 338 | getvalue | ref | function | res = self.tmpfile.getvalue()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 343 | writeorg | def | function | def writeorg(self, data):
self._assert_state("writeorg", ("started", "suspended"))
self._old.write(data)
self._old.flush()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 344 | _assert_state | ref | function | self._assert_state("writeorg", ("started", "suspended"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 349 | FDCaptureBinary | def | class | __init__ __repr__ _assert_state start snap done suspend resume writeorg |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 382 | SysCapture | ref | function | self.syscapture = SysCapture(targetfd)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 384 | EncodedFile | ref | function | self.tmpfile = EncodedFile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 392 | SysCapture | ref | function | self.syscapture = SysCapture(targetfd, self.tmpfile)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 394 | NoCapture | ref | function | self.syscapture = NoCapture()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 407 | _assert_state | def | function | def _assert_state(self, op: str, states: Tuple[str, ...]) -> None:
assert (
self._state in states
), "cannot {} in state {!r}: expected one of {}".format(
op, self._state, ", ".join(states)
)
def start(self) -> None:
self._assert_state("start", ("initiali... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 414 | start | def | function | def start(self) -> None:
self._assert_state("start", ("initialized",))
setattr(sys, self.name, self.tmpfile)
self._state = "started"
def snap(self):
self._assert_state("snap", ("started", "suspended"))
self.tmpfile.seek(0)
res = self.tmpfile.buffer.read()
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 416 | _assert_state | ref | function | self._assert_state("start", ("initialized",))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 418 | start | ref | function | self.syscapture.start()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 421 | snap | def | function | def snap(self):
self._assert_state("snap", ("started", "suspended"))
self.tmpfile.seek(0)
res = self.tmpfile.buffer.read()
self.tmpfile.seek(0)
self.tmpfile.truncate()
return res
def done(self) -> None:
self._assert_state("done", ("initialized", "started"... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 422 | _assert_state | ref | function | self._assert_state("snap", ("started", "suspended"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 429 | done | def | function | def done(self) -> None:
self._assert_state("done", ("initialized", "started", "suspended", "done"))
if self._state == "done":
return
setattr(sys, self.name, self._old)
del self._old
self.tmpfile.close()
self._state = "done"
def suspend(self) -> None:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 432 | _assert_state | ref | function | self._assert_state("done", ("initialized", "started", "suspended", "done"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 441 | done | ref | function | self.syscapture.done()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 445 | suspend | def | function | def suspend(self) -> None:
self._assert_state("suspend", ("started", "suspended"))
setattr(sys, self.name, self._old)
self._state = "suspended"
def resume(self) -> None:
self._assert_state("resume", ("started", "suspended"))
if self._state == "started":
retur... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 446 | _assert_state | ref | function | self._assert_state("suspend", ("started", "suspended"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 449 | suspend | ref | function | self.syscapture.suspend()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 453 | resume | def | function | def resume(self) -> None:
self._assert_state("resume", ("started", "suspended"))
if self._state == "started":
return
setattr(sys, self.name, self.tmpfile)
self._state = "started"
def writeorg(self, data) -> None:
self._assert_state("writeorg", ("started", "su... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 454 | _assert_state | ref | function | self._assert_state("resume", ("started", "suspended"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 457 | resume | ref | function | self.syscapture.resume()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 461 | writeorg | def | function | def writeorg(self, data):
self._assert_state("writeorg", ("started", "suspended"))
self._old.write(data)
self._old.flush()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 463 | _assert_state | ref | function | self._assert_state("writeorg", ("started", "suspended"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 467 | FDCapture | def | class | snap writeorg |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 476 | snap | def | function | def snap(self):
self._assert_state("snap", ("started", "suspended"))
self.tmpfile.seek(0)
res = self.tmpfile.buffer.read()
self.tmpfile.seek(0)
self.tmpfile.truncate()
return res
def done(self) -> None:
self._assert_state("done", ("initialized", "started"... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 477 | _assert_state | ref | function | self._assert_state("snap", ("started", "suspended"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 484 | writeorg | def | function | def writeorg(self, data):
self._assert_state("writeorg", ("started", "suspended"))
self._old.write(data)
self._old.flush()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 486 | writeorg | ref | function | super().writeorg(data.encode("utf-8")) # XXX use encoding of original stream
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 499 | CaptureResult | def | class | __init__ __len__ __iter__ __getitem__ _replace count index __eq__ __hash__ __lt__ __repr__ |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 517 | _replace | def | function | def _replace(
self, *, out: Optional[AnyStr] = None, err: Optional[AnyStr] = None
) -> "CaptureResult[AnyStr]":
return CaptureResult(
out=self.out if out is None else out, err=self.err if err is None else err
)
def count(self, value: AnyStr) -> int:
return tuple(... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 520 | CaptureResult | ref | function | return CaptureResult(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 547 | MultiCapture | def | class | __init__ __repr__ start_capturing pop_outerr_to_orig suspend_capturing resume_capturing stop_capturing is_started readouterr |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 565 | start_capturing | def | function | def start_capturing(self) -> None:
self._state = "started"
if self.in_:
self.in_.start()
if self.out:
self.out.start()
if self.err:
self.err.start()
def pop_outerr_to_orig(self) -> Tuple[AnyStr, AnyStr]:
"""Pop current snapshot out/err... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 568 | start | ref | function | self.in_.start()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 570 | start | ref | function | self.out.start()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 572 | start | ref | function | self.err.start()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 574 | pop_outerr_to_orig | def | function | def pop_outerr_to_orig(self) -> Tuple[AnyStr, AnyStr]:
"""Pop current snapshot out/err capture and flush to orig streams."""
out, err = self.readouterr()
if out:
self.out.writeorg(out)
if err:
self.err.writeorg(err)
return out, err
def suspend_cap... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 576 | readouterr | ref | function | out, err = self.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 578 | writeorg | ref | function | self.out.writeorg(out)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 580 | writeorg | ref | function | self.err.writeorg(err)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 583 | suspend_capturing | def | function | null |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 586 | suspend | ref | function | self.out.suspend()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 588 | suspend | ref | function | self.err.suspend()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 590 | suspend | ref | function | self.in_.suspend()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 593 | resume_capturing | def | function | def resume_capturing(self) -> None:
self._state = "started"
if self.out:
self.out.resume()
if self.err:
self.err.resume()
if self._in_suspended:
self.in_.resume()
self._in_suspended = _False
def stop_capturing(self) -> None:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 596 | resume | ref | function | self.out.resume()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 598 | resume | ref | function | self.err.resume()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 600 | resume | ref | function | self.in_.resume()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 603 | stop_capturing | def | function | def stop_capturing(self) -> None:
"""Stop capturing and reset capturing streams."""
if self._state == "stopped":
raise ValueError("was already stopped")
self._state = "stopped"
if self.out:
self.out.done()
if self.err:
self.err.done()
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 609 | done | ref | function | self.out.done()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 611 | done | ref | function | self.err.done()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 613 | done | ref | function | self.in_.done()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 615 | is_started | def | function | def is_started(self) -> bool:
"""Whether actively capturing -- not suspended or stopped."""
return self._state == "started"
def readouterr(self) -> CaptureResult[AnyStr]:
out = self.out.snap() if self.out else ""
err = self.err.snap() if self.err else ""
return CaptureRe... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 619 | 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 | 620 | snap | ref | function | out = self.out.snap() if self.out else ""
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 621 | snap | ref | function | err = self.err.snap() if self.err else ""
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 622 | CaptureResult | ref | function | return CaptureResult(out, err)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 625 | _get_multicapture | def | function | def _get_multicapture(method: "_CaptureMethod") -> MultiCapture[str]:
if method == "fd":
return MultiCapture(in_=FDCapture(0), out=FDCapture(1), err=FDCapture(2))
elif method == "sys":
return MultiCapture(in_=SysCapture(0), out=SysCapture(1), err=SysCapture(2))
elif method == "no":
r... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 627 | MultiCapture | ref | function | return MultiCapture(in_=FDCapture(0), out=FDCapture(1), err=FDCapture(2))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 627 | FDCapture | ref | function | return MultiCapture(in_=FDCapture(0), out=FDCapture(1), err=FDCapture(2))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 627 | FDCapture | ref | function | return MultiCapture(in_=FDCapture(0), out=FDCapture(1), err=FDCapture(2))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 627 | FDCapture | ref | function | return MultiCapture(in_=FDCapture(0), out=FDCapture(1), err=FDCapture(2))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 629 | MultiCapture | ref | function | return MultiCapture(in_=SysCapture(0), out=SysCapture(1), err=SysCapture(2))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 629 | SysCapture | ref | function | return MultiCapture(in_=SysCapture(0), out=SysCapture(1), err=SysCapture(2))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 629 | SysCapture | ref | function | return MultiCapture(in_=SysCapture(0), out=SysCapture(1), err=SysCapture(2))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 629 | SysCapture | ref | function | return MultiCapture(in_=SysCapture(0), out=SysCapture(1), err=SysCapture(2))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 631 | MultiCapture | ref | function | return MultiCapture(in_=None, out=None, err=None)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 633 | MultiCapture | ref | function | return MultiCapture(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 634 | SysCapture | ref | function | in_=None, out=SysCapture(1, tee=True), err=SysCapture(2, tee=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 634 | SysCapture | ref | function | in_=None, out=SysCapture(1, tee=True), err=SysCapture(2, tee=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 642 | CaptureManager | def | class | __init__ __repr__ is_capturing is_globally_capturing start_global_capturing stop_global_capturing resume_global_capture suspend_global_capture suspend resume read_global_capture set_fixture unset_fixture activate_fixture deactivate_fixture suspend_fixture resume_fixture global_and_fixture_disabled item_capture pytest_m... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 671 | is_capturing | def | function | def is_capturing(self) -> Union[str, bool]:
if self.is_globally_capturing():
return "global"
if self._capture_fixture:
return "fixture %s" % self._capture_fixture.request.fixturename
return _False
# Global capturing control
def is_globally_capturing(self) ->... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 672 | is_globally_capturing | ref | function | if self.is_globally_capturing():
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 680 | is_globally_capturing | def | function | def is_globally_capturing(self) -> bool:
return self._method != "no"
def start_global_capturing(self) -> None:
assert self._global_capturing is None
self._global_capturing = _get_multicapture(self._method)
self._global_capturing.start_capturing()
def stop_global_capturing(s... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 683 | start_global_capturing | def | function | def start_global_capturing(self) -> None:
assert self._global_capturing is None
self._global_capturing = _get_multicapture(self._method)
self._global_capturing.start_capturing()
def stop_global_capturing(self) -> None:
if self._global_capturing is not None:
self._glo... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 685 | _get_multicapture | ref | function | self._global_capturing = _get_multicapture(self._method)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 686 | start_capturing | ref | function | self._global_capturing.start_capturing()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 688 | stop_global_capturing | def | function | def stop_global_capturing(self) -> None:
if self._global_capturing is not None:
self._global_capturing.pop_outerr_to_orig()
self._global_capturing.stop_capturing()
self._global_capturing = None
def resume_global_capture(self) -> None:
# During teardown of the... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 690 | pop_outerr_to_orig | ref | function | self._global_capturing.pop_outerr_to_orig()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 691 | stop_capturing | ref | function | self._global_capturing.stop_capturing()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 694 | resume_global_capture | def | function | def resume_global_capture(self) -> None:
# During teardown of the python process, and on rare occasions, capture
# attributes can be `None` while trying to resume global capture.
if self._global_capturing is not None:
self._global_capturing.resume_capturing()
def suspend_glo... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 698 | resume_capturing | ref | function | self._global_capturing.resume_capturing()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 700 | suspend_global_capture | def | function | null |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 702 | suspend_capturing | ref | function | self._global_capturing.suspend_capturing(in_=in_)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 704 | suspend | def | function | null |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 706 | suspend_fixture | ref | function | self.suspend_fixture()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 707 | suspend_global_capture | ref | function | self.suspend_global_capture(in_)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 709 | resume | def | function | def resume(self) -> None:
self._assert_state("resume", ("started", "suspended"))
if self._state == "started":
return
setattr(sys, self.name, self.tmpfile)
self._state = "started"
def writeorg(self, data) -> None:
self._assert_state("writeorg", ("started", "su... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 710 | resume_global_capture | ref | function | self.resume_global_capture()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 711 | resume_fixture | ref | function | self.resume_fixture()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 713 | read_global_capture | def | function | def read_global_capture(self) -> CaptureResult[str]:
assert self._global_capturing is not None
return self._global_capturing.readouterr()
# Fixture Control
def set_fixture(self, capture_fixture: "CaptureFixture[Any]") -> None:
if self._capture_fixture:
current_fixture =... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 715 | readouterr | ref | function | return self._global_capturing.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 719 | set_fixture | def | function | def set_fixture(self, capture_fixture: "CaptureFixture[Any]") -> None:
if self._capture_fixture:
current_fixture = self._capture_fixture.request.fixturename
requested_fixture = capture_fixture.request.fixturename
capture_fixture.request.raiseerror(
"cannot... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 723 | raiseerror | ref | function | capture_fixture.request.raiseerror(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 730 | unset_fixture | def | function | def unset_fixture(self) -> None:
self._capture_fixture = None
def activate_fixture(self) -> None:
"""If the current item is using ``capsys`` or ``capfd``, activate
them so they take precedence over the global capture."""
if self._capture_fixture:
self._capture_fixtur... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/capture.py | src/_pytest/capture.py | 733 | activate_fixture | def | function | def activate_fixture(self) -> None:
"""If the current item is using ``capsys`` or ``capfd``, activate
them so they take precedence over the global capture."""
if self._capture_fixture:
self._capture_fixture._start()
def deactivate_fixture(self) -> None:
"""Deactivate... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.