(self, pytester: Pytester)
| 539 | |
| 540 | class TestFunctional: |
| 541 | def test_merging_markers_deep(self, pytester: Pytester) -> None: |
| 542 | # issue 199 - propagate markers into nested classes |
| 543 | p = pytester.makepyfile( |
| 544 | """ |
| 545 | import pytest |
| 546 | class TestA(object): |
| 547 | pytestmark = pytest.mark.a |
| 548 | def test_b(self): |
| 549 | assert True |
| 550 | class TestC(object): |
| 551 | # this one didn't get marked |
| 552 | def test_d(self): |
| 553 | assert True |
| 554 | """ |
| 555 | ) |
| 556 | items, _rec = pytester.inline_genitems(p) |
| 557 | for item in items: |
| 558 | print(item, item.keywords) |
| 559 | assert [x for x in item.iter_markers() if x.name == "a"] |
| 560 | |
| 561 | def test_mark_decorator_subclass_does_not_propagate_to_base( |
| 562 | self, pytester: Pytester |
nothing calls this directly
no test coverage detected