| 598 | rec.assertoutcome(passed=1) |
| 599 | |
| 600 | def test_parametrize_with_mark(self, pytester: Pytester) -> None: |
| 601 | items = pytester.getitems( |
| 602 | """ |
| 603 | import pytest |
| 604 | @pytest.mark.foo |
| 605 | @pytest.mark.parametrize('arg', [ |
| 606 | 1, |
| 607 | pytest.param(2, marks=[pytest.mark.baz, pytest.mark.bar]) |
| 608 | ]) |
| 609 | def test_function(arg): |
| 610 | pass |
| 611 | """ |
| 612 | ) |
| 613 | keywords = [item.keywords for item in items] |
| 614 | assert ( |
| 615 | "foo" in keywords[0] |
| 616 | and "bar" not in keywords[0] |
| 617 | and "baz" not in keywords[0] |
| 618 | ) |
| 619 | assert "foo" in keywords[1] and "bar" in keywords[1] and "baz" in keywords[1] |
| 620 | |
| 621 | def test_parametrize_with_empty_string_arguments(self, pytester: Pytester) -> None: |
| 622 | items = pytester.getitems( |