(self, pytester: Pytester)
| 1405 | reprec.assertoutcome(passed=2) |
| 1406 | |
| 1407 | def test_usefixtures_ini(self, pytester: Pytester) -> None: |
| 1408 | pytester.makeini( |
| 1409 | """ |
| 1410 | [pytest] |
| 1411 | usefixtures = myfix |
| 1412 | """ |
| 1413 | ) |
| 1414 | pytester.makeconftest( |
| 1415 | """ |
| 1416 | import pytest |
| 1417 | |
| 1418 | @pytest.fixture(scope="class") |
| 1419 | def myfix(request): |
| 1420 | request.cls.hello = "world" |
| 1421 | |
| 1422 | """ |
| 1423 | ) |
| 1424 | pytester.makepyfile( |
| 1425 | """ |
| 1426 | class TestClass(object): |
| 1427 | def test_one(self): |
| 1428 | assert self.hello == "world" |
| 1429 | def test_two(self): |
| 1430 | assert self.hello == "world" |
| 1431 | """ |
| 1432 | ) |
| 1433 | reprec = pytester.inline_run() |
| 1434 | reprec.assertoutcome(passed=2) |
| 1435 | |
| 1436 | def test_usefixtures_seen_in_showmarkers(self, pytester: Pytester) -> None: |
| 1437 | result = pytester.runpytest("--markers") |
nothing calls this directly
no test coverage detected