(self, pytester: Pytester)
| 1380 | assert len(values) == 1 |
| 1381 | |
| 1382 | def test_usefixtures_marker(self, pytester: Pytester) -> None: |
| 1383 | pytester.makepyfile( |
| 1384 | """ |
| 1385 | import pytest |
| 1386 | |
| 1387 | values = [] |
| 1388 | |
| 1389 | @pytest.fixture(scope="class") |
| 1390 | def myfix(request): |
| 1391 | request.cls.hello = "world" |
| 1392 | values.append(1) |
| 1393 | |
| 1394 | class TestClass(object): |
| 1395 | def test_one(self): |
| 1396 | assert self.hello == "world" |
| 1397 | assert len(values) == 1 |
| 1398 | def test_two(self): |
| 1399 | assert self.hello == "world" |
| 1400 | assert len(values) == 1 |
| 1401 | pytest.mark.usefixtures("myfix")(TestClass) |
| 1402 | """ |
| 1403 | ) |
| 1404 | reprec = pytester.inline_run() |
| 1405 | reprec.assertoutcome(passed=2) |
| 1406 | |
| 1407 | def test_usefixtures_ini(self, pytester: Pytester) -> None: |
| 1408 | pytester.makeini( |
nothing calls this directly
no test coverage detected