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/hookspec.py
src/_pytest/hookspec.py
476
pytest_runtest_logfinish
def
function
def pytest_runtest_logfinish( nodeid: str, location: Tuple[str, Optional[int], str]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
488
pytest_runtest_setup
def
function
def pytest_runtest_setup(item: "Item") -> None: """Called to perform the setup phase for a test item. The default implementation runs ``setup()`` on ``item`` and all of its parents (which haven't been setup yet). This includes obtaining the values of fixtures required by the item (which haven't been ob...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
498
pytest_runtest_call
def
function
def pytest_runtest_call(item: "Item") -> None: """Called to run the test for test item (the call phase). The default implementation calls ``item.runtest()``. """
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
505
pytest_runtest_teardown
def
function
def pytest_runtest_teardown(item: "Item", nextitem: Optional["Item"]) -> None: """Called to perform the teardown phase for a test item. The default implementation runs the finalizers and calls ``teardown()`` on ``item`` and all of its parents (which need to be torn down). This includes running the tear...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
521
hookspec
ref
function
@hookspec(firstresult=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
522
pytest_runtest_makereport
def
function
def pytest_runtest_makereport( item: "Item", call: "CallInfo[None]"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
536
pytest_runtest_logreport
def
function
def pytest_runtest_logreport(report: "TestReport") -> None: """Process the :class:`~pytest.TestReport` produced for each of the setup, call and teardown runtest phases of an item. See :func:`pytest_runtest_protocol` for a description of the runtest protocol. """
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
544
hookspec
ref
function
@hookspec(firstresult=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
545
pytest_report_to_serializable
def
function
def pytest_report_to_serializable( config: "Config", report: Union["CollectReport", "TestReport"],
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
553
hookspec
ref
function
@hookspec(firstresult=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
554
pytest_report_from_serializable
def
function
def pytest_report_from_serializable( config: "Config", data: Dict[str, Any],
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
567
hookspec
ref
function
@hookspec(firstresult=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
568
pytest_fixture_setup
def
function
def pytest_fixture_setup( fixturedef: "FixtureDef[Any]", request: "SubRequest"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
584
pytest_fixture_post_finalizer
def
function
def pytest_fixture_post_finalizer( fixturedef: "FixtureDef[Any]", request: "SubRequest"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
597
pytest_sessionstart
def
function
def pytest_sessionstart(session: "Session") -> None: """Called after the ``Session`` object has been created and before performing collection and entering the run test loop. :param pytest.Session session: The pytest session object. """
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
605
pytest_sessionfinish
def
function
def pytest_sessionfinish( session: "Session", exitstatus: Union[int, "ExitCode"],
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
616
pytest_unconfigure
def
function
def pytest_unconfigure(config: "Config") -> None: """Called before test process is exited. :param pytest.Config config: The pytest config object. """
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
628
pytest_assertrepr_compare
def
function
def pytest_assertrepr_compare( config: "Config", op: str, left: object, right: object
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
642
pytest_assertion_pass
def
function
def pytest_assertion_pass(item: "Item", lineno: int, orig: str, expl: str) -> None: """Called whenever an assertion passes. .. versionadded:: 5.0 Use this hook to do some processing after a passing assertion. The original assertion information is available in the `orig` string and the pytest intro...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
675
pytest_report_header
def
function
def pytest_report_header( config: "Config", startpath: Path, startdir: "LEGACY_PATH"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
704
pytest_report_collectionfinish
def
function
def pytest_report_collectionfinish( config: "Config", startpath: Path, startdir: "LEGACY_PATH", items: Sequence["Item"],
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
736
hookspec
ref
function
@hookspec(firstresult=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
737
pytest_report_teststatus
def
function
def pytest_report_teststatus( report: Union["CollectReport", "TestReport"], config: "Config"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
763
pytest_terminal_summary
def
function
def pytest_terminal_summary( terminalreporter: "TerminalReporter", exitstatus: "ExitCode", config: "Config",
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
779
hookspec
ref
function
@hookspec(historic=True, warn_on_impl=WARNING_CAPTURED_HOOK)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
780
pytest_warning_captured
def
function
def pytest_warning_captured( warning_message: "warnings.WarningMessage", when: "Literal['config', 'collect', 'runtest']", item: Optional["Item"], location: Optional[Tuple[str, int, str]],
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
814
hookspec
ref
function
@hookspec(historic=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
815
pytest_warning_recorded
def
function
def pytest_warning_recorded( warning_message: "warnings.WarningMessage", when: "Literal['config', 'collect', 'runtest']", nodeid: str, location: Optional[Tuple[str, int, str]],
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
851
pytest_markeval_namespace
def
function
def pytest_markeval_namespace(config: "Config") -> Dict[str, Any]: """Called when constructing the globals dictionary used for evaluating string conditions in xfail/skipif markers. This is useful when the condition for a marker requires objects that are expensive or impossible to obtain during coll...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
872
pytest_internalerror
def
function
def pytest_internalerror( excrepr: "ExceptionRepr", excinfo: "ExceptionInfo[BaseException]",
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
883
pytest_keyboard_interrupt
def
function
def pytest_keyboard_interrupt( excinfo: "ExceptionInfo[Union[KeyboardInterrupt, Exit]]",
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
889
pytest_exception_interact
def
function
def pytest_exception_interact( node: Union["Item", "Collector"], call: "CallInfo[Any]", report: Union["CollectReport", "TestReport"],
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
908
pytest_enter_pdb
def
function
def pytest_enter_pdb(config: "Config", pdb: "pdb.Pdb") -> None: """Called upon pdb.set_trace(). Can be used by plugins to take special action just before the python debugger enters interactive mode. :param pytest.Config config: The pytest config object. :param pdb.Pdb pdb: The Pdb instance. ""...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/hookspec.py
src/_pytest/hookspec.py
919
pytest_leave_pdb
def
function
def pytest_leave_pdb(config: "Config", pdb: "pdb.Pdb") -> None: """Called when leaving pdb (e.g. with continue after pdb.set_trace()). Can be used by plugins to take special action just after the python debugger leaves interactive mode. :param pytest.Config config: The pytest config object. :param...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
39
bin_xml_escape
def
function
def bin_xml_escape(arg: object) -> str: r"""Visually escape invalid XML characters. For example, transforms 'hello\aworld\b' into 'hello#x07world#x08' Note that the #xABs are *not* XML escapes - missing the ampersand &#xAB. The idea is to escape visually for the user rather than for...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
50
repl
def
function
def repl(matchobj: Match[str]) -> str: i = ord(matchobj.group()) if i <= 0xFF: return "#x%02X" % i else: return "#x%04X" % i # The spec range of valid chars is: # Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] # For an unk...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
51
group
ref
function
i = ord(matchobj.group())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
66
merge_family
def
function
def merge_family(left, right) -> None: result = {} for kl, vl in left.items(): for kr, vr in right.items(): if not isinstance(vl, list): raise TypeError(type(vl)) result[kl] = vl + vr left.update(result)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
82
merge_family
ref
function
merge_family(families["xunit1"], families["_base_legacy"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
88
_NodeReporter
def
class
__init__ append add_property add_attribute make_properties_node record_testreport to_xml _add_simple write_captured_output _prepare_content _write_content append_pass append_failure append_collect_error append_collect_skipped append_error append_skipped finalize
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
100
add_stats
ref
function
self.xml.add_stats(node.tag)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
103
add_property
def
function
def add_property(self, name: str, value: object) -> None: self.properties.append((str(name), bin_xml_escape(value))) def add_attribute(self, name: str, value: object) -> None: self.attrs[str(name)] = bin_xml_escape(value) def make_properties_node(self) -> Optional[ET.Element]: """R...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
104
bin_xml_escape
ref
function
self.properties.append((str(name), bin_xml_escape(value)))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
106
add_attribute
def
function
def add_attribute(self, name: str, value: object) -> None: self.attrs[str(name)] = bin_xml_escape(value) def make_properties_node(self) -> Optional[ET.Element]: """Return a Junit node containing custom properties, if any.""" if self.properties: properties = ET.Element("prope...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
107
bin_xml_escape
ref
function
self.attrs[str(name)] = bin_xml_escape(value)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
109
make_properties_node
def
function
def make_properties_node(self) -> Optional[ET.Element]: """Return a Junit node containing custom properties, if any.""" if self.properties: properties = ET.Element("properties") for name, value in self.properties: properties.append(ET.Element("property", name=...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
112
Element
ref
function
properties = ET.Element("properties")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
114
Element
ref
function
properties.append(ET.Element("property", name=name, value=value))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
118
record_testreport
def
function
def record_testreport(self, testreport: TestReport) -> None: names = mangle_test_address(testreport.nodeid) existing_attrs = self.attrs classnames = names[:-1] if self.xml.prefix: classnames.insert(0, self.xml.prefix) attrs: Dict[str, str] = { "classna...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
119
mangle_test_address
ref
function
names = mangle_test_address(testreport.nodeid)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
126
bin_xml_escape
ref
function
"name": bin_xml_escape(names[-1]),
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
148
to_xml
def
function
def to_xml(self) -> ET.Element: testcase = ET.Element("testcase", self.attrs, time="%.3f" % self.duration) properties = self.make_properties_node() if properties is not None: testcase.append(properties) testcase.extend(self.nodes) return testcase def _add_sim...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
149
Element
ref
function
testcase = ET.Element("testcase", self.attrs, time="%.3f" % self.duration)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
150
make_properties_node
ref
function
properties = self.make_properties_node()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
156
_add_simple
def
function
def _add_simple(self, tag: str, message: str, data: Optional[str] = None) -> None: node = ET.Element(tag, message=message) node.text = bin_xml_escape(data) self.append(node) def write_captured_output(self, report: TestReport) -> None: if not self.xml.log_passing_tests and report...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
157
Element
ref
function
node = ET.Element(tag, message=message)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
158
bin_xml_escape
ref
function
node.text = bin_xml_escape(data)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
161
write_captured_output
def
function
def write_captured_output(self, report: TestReport) -> None: if not self.xml.log_passing_tests and report.passed: return content_out = report.capstdout content_log = report.caplog content_err = report.capstderr if self.xml.logging == "no": return ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
172
_prepare_content
ref
function
content_all = self._prepare_content(content_log, " Captured Log ")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
174
_prepare_content
ref
function
content_all += self._prepare_content(content_out, " Captured Out ")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
175
_write_content
ref
function
self._write_content(report, content_all, "system-out")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
178
_prepare_content
ref
function
content_all += self._prepare_content(content_err, " Captured Err ")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
179
_write_content
ref
function
self._write_content(report, content_all, "system-err")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
182
_write_content
ref
function
self._write_content(report, content_all, "system-out")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
184
_prepare_content
def
function
def _prepare_content(self, content: str, header: str) -> str: return "\n".join([header.center(80, "-"), content, ""]) def _write_content(self, report: TestReport, content: str, jheader: str) -> None: tag = ET.Element(jheader) tag.text = bin_xml_escape(content) self.append(tag) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
187
_write_content
def
function
def _write_content(self, report: TestReport, content: str, jheader: str) -> None: tag = ET.Element(jheader) tag.text = bin_xml_escape(content) self.append(tag) def append_pass(self, report: TestReport) -> None: self.add_stats("passed") def append_failure(self, report: TestR...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
188
Element
ref
function
tag = ET.Element(jheader)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
189
bin_xml_escape
ref
function
tag.text = bin_xml_escape(content)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
192
append_pass
def
function
def append_pass(self, report: TestReport) -> None: self.add_stats("passed") def append_failure(self, report: TestReport) -> None: # msg = str(report.longrepr.reprtraceback.extraline) if hasattr(report, "wasxfail"): self._add_simple("skipped", "xfail-marked test passes unexpe...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
193
add_stats
ref
function
self.add_stats("passed")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
195
append_failure
def
function
def append_failure(self, report: TestReport) -> None: # msg = str(report.longrepr.reprtraceback.extraline) if hasattr(report, "wasxfail"): self._add_simple("skipped", "xfail-marked test passes unexpectedly") else: assert report.longrepr is not None reprcra...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
198
_add_simple
ref
function
self._add_simple("skipped", "xfail-marked test passes unexpectedly")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
208
bin_xml_escape
ref
function
message = bin_xml_escape(message)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
209
_add_simple
ref
function
self._add_simple("failure", message, str(report.longrepr))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
211
append_collect_error
def
function
def append_collect_error(self, report: TestReport) -> None: # msg = str(report.longrepr.reprtraceback.extraline) assert report.longrepr is not None self._add_simple("error", "collection failure", str(report.longrepr)) def append_collect_skipped(self, report: TestReport) -> None: ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
214
_add_simple
ref
function
self._add_simple("error", "collection failure", str(report.longrepr))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
216
append_collect_skipped
def
function
def append_collect_skipped(self, report: TestReport) -> None: self._add_simple("skipped", "collection skipped", str(report.longrepr)) def append_error(self, report: TestReport) -> None: assert report.longrepr is not None reprcrash: Optional[ReprFileLocation] = getattr( repor...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
217
_add_simple
ref
function
self._add_simple("skipped", "collection skipped", str(report.longrepr))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
219
append_error
def
function
def append_error(self, report: TestReport) -> None: assert report.longrepr is not None reprcrash: Optional[ReprFileLocation] = getattr( report.longrepr, "reprcrash", None ) if reprcrash is not None: reason = reprcrash.message else: reason =...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
233
_add_simple
ref
function
self._add_simple("error", msg, str(report.longrepr))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
235
append_skipped
def
function
def append_skipped(self, report: TestReport) -> None: if hasattr(report, "wasxfail"): xfailreason = report.wasxfail if xfailreason.startswith("reason: "): xfailreason = xfailreason[8:] xfailreason = bin_xml_escape(xfailreason) skipped = ET.Elem...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
240
bin_xml_escape
ref
function
xfailreason = bin_xml_escape(xfailreason)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
241
Element
ref
function
skipped = ET.Element("skipped", type="pytest.xfail", message=xfailreason)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
250
Element
ref
function
skipped = ET.Element("skipped", type="pytest.skip", message=skipreason)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
251
bin_xml_escape
ref
function
skipped.text = bin_xml_escape(details)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
253
write_captured_output
ref
function
self.write_captured_output(report)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
255
finalize
def
function
def finalize(self) -> None: data = self.to_xml() self.__dict__.clear() # Type ignored becuase mypy doesn't like overriding a method. # Also the return value doesn't match... self.to_xml = lambda: data # type: ignore[assignment]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
256
to_xml
ref
function
data = self.to_xml()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
263
_warn_incompatibility_with_xunit2
def
function
def _warn_incompatibility_with_xunit2( request: FixtureRequest, fixture_name: str
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
271
warn
ref
function
request.node.warn(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
272
PytestWarning
ref
function
PytestWarning(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
281
record_property
def
function
def record_property(request: FixtureRequest) -> Callable[[str, object], None]: """Add extra properties to the calling test. User properties become part of the test report and are available to the configured reporters, like JUnit XML. The fixture is callable with ``name, value``. The value is automatic...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
295
_warn_incompatibility_with_xunit2
ref
function
_warn_incompatibility_with_xunit2(request, "record_property")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
297
append_property
def
function
def append_property(name: str, value: object) -> None: request.node.user_properties.append((name, value)) return append_property
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
304
record_xml_attribute
def
function
def record_xml_attribute(request: FixtureRequest) -> Callable[[str, object], None]: """Add extra xml attributes to the tag for the calling test. The fixture is callable with ``name, value``. The value is automatically XML-encoded. """ from _pytest.warning_types import PytestExperimentalApiWarning ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
312
warn
ref
function
request.node.warn(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
313
PytestExperimentalApiWarning
ref
function
PytestExperimentalApiWarning("record_xml_attribute is an experimental feature")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
316
_warn_incompatibility_with_xunit2
ref
function
_warn_incompatibility_with_xunit2(request, "record_xml_attribute")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
319
add_attr_noop
def
function
def add_attr_noop(name: str, value: object) -> None: pass attr_func = add_attr_noop xml = request.config.stash.get(xml_key, None) if xml is not None: node_reporter = xml.node_reporter(request.node.nodeid) attr_func = node_reporter.add_attribute return attr_func
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/junitxml.py
src/_pytest/junitxml.py
326
node_reporter
ref
function
node_reporter = xml.node_reporter(request.node.nodeid)