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/test_helpconfig.py
testing/test_helpconfig.py
30
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
47
test_none_help_param_raises_exception
def
function
def test_none_help_param_raises_exception(pytester: Pytester) -> None: """Test that a None help param raises a TypeError.""" pytester.makeconftest( """ def pytest_addoption(parser): parser.addini("test_ini", None, default=_True, type="bool") """ ) result = pytester.runpyt...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
49
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
55
runpytest
ref
function
result = pytester.runpytest("--help")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
56
fnmatch_lines
ref
function
result.stderr.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
61
test_empty_help_param
def
function
def test_empty_help_param(pytester: Pytester) -> None: """Test that an empty help param is displayed correctly.""" pytester.makeconftest( """ def pytest_addoption(parser): parser.addini("test_ini", "", default=_True, type="bool") """ ) result = pytester.runpytest("--help"...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
63
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
69
runpytest
ref
function
result = pytester.runpytest("--help")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
77
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(lines, consecutive=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
80
test_hookvalidation_unknown
def
function
def test_hookvalidation_unknown(pytester: Pytester) -> None: pytester.makeconftest( """ def pytest_hello(xyz): pass """ ) result = pytester.runpytest() assert result.ret != 0 result.stdout.fnmatch_lines(["*unknown hook*pytest_hello*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
81
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
87
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
89
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*unknown hook*pytest_hello*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
92
test_hookvalidation_optional
def
function
def test_hookvalidation_optional(pytester: Pytester) -> None: pytester.makeconftest( """ import pytest @pytest.hookimpl(optionalhook=_True) def pytest_hello(xyz): pass """ ) result = pytester.runpytest() assert result.ret == ExitCode.NO_TESTS_COLLECTED
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
93
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
101
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
105
test_traceconfig
def
function
def test_traceconfig(pytester: Pytester) -> None: result = pytester.runpytest("--traceconfig") result.stdout.fnmatch_lines(["*using*pytest*", "*active plugins*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
106
runpytest
ref
function
result = pytester.runpytest("--traceconfig")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
107
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*using*pytest*", "*active plugins*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
110
test_debug
def
function
def test_debug(pytester: Pytester) -> None: result = pytester.runpytest_subprocess("--debug") assert result.ret == ExitCode.NO_TESTS_COLLECTED p = pytester.path.joinpath("pytestdebug.log") assert "pytest_sessionstart" in p.read_text("utf-8")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
111
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess("--debug")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
113
joinpath
ref
function
p = pytester.path.joinpath("pytestdebug.log")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
114
read_text
ref
function
assert "pytest_sessionstart" in p.read_text("utf-8")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
117
test_PYTEST_DEBUG
def
function
def test_PYTEST_DEBUG(pytester: Pytester, monkeypatch) -> None: monkeypatch.setenv("PYTEST_DEBUG", "1") result = pytester.runpytest_subprocess() assert result.ret == ExitCode.NO_TESTS_COLLECTED result.stderr.fnmatch_lines( ["*pytest_plugin_registered*", "*manager*PluginManager*"] )
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
118
setenv
ref
function
monkeypatch.setenv("PYTEST_DEBUG", "1")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
119
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_helpconfig.py
testing/test_helpconfig.py
121
fnmatch_lines
ref
function
result.stderr.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
26
fixture
ref
function
@pytest.fixture(scope="session")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
27
schema
def
function
def schema() -> xmlschema.XMLSchema: """Return an xmlschema.XMLSchema object for the junit-10.xsd file.""" fn = Path(__file__).parent / "example_scripts/junit-10.xsd" with fn.open() as f: return xmlschema.XMLSchema(f)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
31
XMLSchema
ref
function
return xmlschema.XMLSchema(f)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
34
RunAndParse
def
class
__init__ __call__
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
45
runpytest
ref
function
result = self.pytester.runpytest("--junitxml=%s" % xml_path, *args)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
48
validate
ref
function
self.schema.validate(f)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
49
parse
ref
function
xmldoc = minidom.parse(str(xml_path))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
50
DomNode
ref
function
return result, DomNode(xmldoc)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
54
run_and_parse
def
function
def run_and_parse(pytester: Pytester, schema: xmlschema.XMLSchema) -> RunAndParse: """Fixture that returns a function that can be used to execute pytest and return the parsed ``DomNode`` of the root xml node. The ``family`` parameter is used to configure the ``junit_family`` of the written report. "xun...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
61
RunAndParse
ref
function
return RunAndParse(pytester, schema)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
64
assert_attr
def
function
def assert_attr(node, **kwargs): __tracebackhide__ = _True def nodeval(node, name): anode = node.getAttributeNode(name) if anode is not None: return anode.value expected = {name: str(value) for name, value in kwargs.items()} on_node = {name: nodeval(node, name) for name in ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
67
nodeval
def
function
def nodeval(node, name): anode = node.getAttributeNode(name) if anode is not None: return anode.value expected = {name: str(value) for name, value in kwargs.items()} on_node = {name: nodeval(node, name) for name in expected} assert on_node == expected
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
68
getAttributeNode
ref
function
anode = node.getAttributeNode(name)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
73
nodeval
ref
function
on_node = {name: nodeval(node, name) for name in expected}
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
77
DomNode
def
class
__init__ __repr__ find_first_by_tag _by_tag children get_unique_child find_nth_by_tag find_by_tag __getitem__ assert_attr toxml text tag next_sibling
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
82
toxml
ref
function
return self.__node.toxml()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
84
find_first_by_tag
def
function
def find_first_by_tag(self, tag): return self.find_nth_by_tag(tag, 0) def _by_tag(self, tag): return self.__node.getElementsByTagName(tag) @property def children(self): return [type(self)(x) for x in self.__node.childNodes] @property def get_unique_child(self): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
85
find_nth_by_tag
ref
function
return self.find_nth_by_tag(tag, 0)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
87
_by_tag
def
function
def _by_tag(self, tag): return self.__node.getElementsByTagName(tag) @property def children(self): return [type(self)(x) for x in self.__node.childNodes] @property def get_unique_child(self): children = self.children assert len(children) == 1 return children...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
88
getElementsByTagName
ref
function
return self.__node.getElementsByTagName(tag)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
91
children
def
function
def children(self): return [type(self)(x) for x in self.__node.childNodes] @property def get_unique_child(self): children = self.children assert len(children) == 1 return children[0] def find_nth_by_tag(self, tag, n): items = self._by_tag(tag) try: ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
95
get_unique_child
def
function
def get_unique_child(self): children = self.children assert len(children) == 1 return children[0] def find_nth_by_tag(self, tag, n): items = self._by_tag(tag) try: nth = items[n] except IndexError: pass else: return typ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
100
find_nth_by_tag
def
function
def find_nth_by_tag(self, tag, n): items = self._by_tag(tag) try: nth = items[n] except IndexError: pass else: return type(self)(nth) def find_by_tag(self, tag): t = type(self) return [t(x) for x in self.__node.getElementsByTag...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
101
_by_tag
ref
function
items = self._by_tag(tag)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
109
find_by_tag
def
function
def find_by_tag(self, tag): t = type(self) return [t(x) for x in self.__node.getElementsByTagName(tag)] def __getitem__(self, key): node = self.__node.getAttributeNode(key) if node is not None: return node.value def assert_attr(self, **kwargs): __traceba...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
111
t
ref
function
return [t(x) for x in self.__node.getElementsByTagName(tag)]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
111
getElementsByTagName
ref
function
return [t(x) for x in self.__node.getElementsByTagName(tag)]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
114
getAttributeNode
ref
function
node = self.__node.getAttributeNode(key)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
118
assert_attr
def
function
def assert_attr(self, **kwargs): __tracebackhide__ = _True return assert_attr(self.__node, **kwargs) def toxml(self): return self.__node.toxml() @property def text(self): return self.__node.childNodes[0].wholeText @property def tag(self): return self.__...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
120
assert_attr
ref
function
return assert_attr(self.__node, **kwargs)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
122
toxml
def
function
def toxml(self): return self.__node.toxml() @property def text(self): return self.__node.childNodes[0].wholeText @property def tag(self): return self.__node.tagName @property def next_sibling(self): return type(self)(self.__node.nextSibling)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
123
toxml
ref
function
return self.__node.toxml()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
126
text
def
function
def text(self): return self.__node.childNodes[0].wholeText @property def tag(self): return self.__node.tagName @property def next_sibling(self): return type(self)(self.__node.nextSibling)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
130
tag
def
function
def tag(self): return self.__node.tagName @property def next_sibling(self): return type(self)(self.__node.nextSibling)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
134
next_sibling
def
function
def next_sibling(self): return type(self)(self.__node.nextSibling)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
138
parametrize
ref
function
parametrize_families = pytest.mark.parametrize("xunit_family", ["xunit1", "xunit2"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
141
TestPython
def
class
test_summing_simple test_summing_simple_with_errors test_hostname_in_xml test_timestamp_in_xml test_timing_function test_junit_duration_report test_setup_error test_teardown_error test_call_failure_teardown_error test_skip_contains_name_reason test_mark_skip_contains_name_reason test_mark_skipif_contains_name_reason te...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
143
test_summing_simple
def
function
def test_summing_simple( self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str ) -> None: pytester.makepyfile( """ import pytest def test_pass(): pass def test_fail(): assert 0 def test_...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
146
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
163
run_and_parse
ref
function
result, dom = run_and_parse(family=xunit_family)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
165
find_first_by_tag
ref
function
node = dom.find_first_by_tag("testsuite")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
166
assert_attr
ref
function
node.assert_attr(name="pytest", errors=0, failures=1, skipped=2, tests=5)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
169
test_summing_simple_with_errors
def
function
def test_summing_simple_with_errors( self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str ) -> None: pytester.makepyfile( """ import pytest @pytest.fixture def fixture(): raise Exception() def test_pas...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
172
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
192
run_and_parse
ref
function
result, dom = run_and_parse(family=xunit_family)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
194
find_first_by_tag
ref
function
node = dom.find_first_by_tag("testsuite")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
195
assert_attr
ref
function
node.assert_attr(name="pytest", errors=1, failures=2, skipped=1, tests=5)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
198
test_hostname_in_xml
def
function
def test_hostname_in_xml( self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str ) -> None: pytester.makepyfile( """ def test_pass(): pass """ ) result, dom = run_and_parse(family=xunit_family) node = dom.fi...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
201
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
207
run_and_parse
ref
function
result, dom = run_and_parse(family=xunit_family)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
208
find_first_by_tag
ref
function
node = dom.find_first_by_tag("testsuite")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
209
assert_attr
ref
function
node.assert_attr(hostname=platform.node())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
212
test_timestamp_in_xml
def
function
def test_timestamp_in_xml( self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str ) -> None: pytester.makepyfile( """ def test_pass(): pass """ ) start_time = datetime.now() result, dom = run_and_parse(famil...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
215
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
222
run_and_parse
ref
function
result, dom = run_and_parse(family=xunit_family)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
223
find_first_by_tag
ref
function
node = dom.find_first_by_tag("testsuite")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
227
test_timing_function
def
function
def test_timing_function( self, pytester: Pytester, run_and_parse: RunAndParse, mock_timing ) -> None: pytester.makepyfile( """ from _pytest import timing def setup_module(): timing.sleep(1) def teardown_module(): ti...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
230
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
241
run_and_parse
ref
function
result, dom = run_and_parse()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
242
find_first_by_tag
ref
function
node = dom.find_first_by_tag("testsuite")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
243
find_first_by_tag
ref
function
tnode = node.find_first_by_tag("testcase")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
247
parametrize
ref
function
@pytest.mark.parametrize("duration_report", ["call", "total"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
248
test_junit_duration_report
def
function
def test_junit_duration_report( self, pytester: Pytester, monkeypatch: MonkeyPatch, duration_report: str, run_and_parse: RunAndParse, ) -> None: # mock LogXML.node_reporter so it always sets a known duration to each test report object original_node_report...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
259
node_reporter_wrapper
def
function
def node_reporter_wrapper(s, report): report.duration = 1.0 reporter = original_node_reporter(s, report) return reporter monkeypatch.setattr(LogXML, "node_reporter", node_reporter_wrapper) pytester.makepyfile( """ def test_foo(): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
261
original_node_reporter
ref
function
reporter = original_node_reporter(s, report)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
266
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
272
run_and_parse
ref
function
result, dom = run_and_parse("-o", f"junit_duration_report={duration_report}")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
273
find_first_by_tag
ref
function
node = dom.find_first_by_tag("testsuite")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
274
find_first_by_tag
ref
function
tnode = node.find_first_by_tag("testcase")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
283
test_setup_error
def
function
def test_setup_error( self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str ) -> None: pytester.makepyfile( """ import pytest @pytest.fixture def arg(request): raise ValueError("Error reason") def test...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
286
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
297
run_and_parse
ref
function
result, dom = run_and_parse(family=xunit_family)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_junitxml.py
testing/test_junitxml.py
299
find_first_by_tag
ref
function
node = dom.find_first_by_tag("testsuite")