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

Method test_scope_session_exc

testing/python/fixtures.py:2278–2297  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

2276 reprec.assertoutcome(passed=3)
2277
2278 def test_scope_session_exc(self, pytester: Pytester) -> None:
2279 pytester.makepyfile(
2280 """
2281 import pytest
2282 values = []
2283 @pytest.fixture(scope="session")
2284 def fix():
2285 values.append(1)
2286 pytest.skip('skipping')
2287
2288 def test_1(fix):
2289 pass
2290 def test_2(fix):
2291 pass
2292 def test_last():
2293 assert values == [1]
2294 """
2295 )
2296 reprec = pytester.inline_run()
2297 reprec.assertoutcome(skipped=2, passed=1)
2298
2299 def test_scope_session_exc_two_fix(self, pytester: Pytester) -> None:
2300 pytester.makepyfile(

Callers

nothing calls this directly

Calls 3

assertoutcomeMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected