MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_nose_setup_ordering

Function test_nose_setup_ordering

testing/test_nose.py:266–282  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

264
265
266def test_nose_setup_ordering(pytester: Pytester) -> None:
267 pytester.makepyfile(
268 """
269 def setup_module(mod):
270 mod.visited = True
271
272 class TestClass(object):
273 def setup(self):
274 assert visited
275 self.visited_cls = True
276 def test_first(self):
277 assert visited
278 assert self.visited_cls
279 """
280 )
281 result = pytester.runpytest()
282 result.stdout.fnmatch_lines(["*1 passed*"])
283
284
285def test_apiwrapper_problem_issue260(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected