| 682 | result.stdout.fnmatch_lines(["* 3 passed in *"]) |
| 683 | |
| 684 | def test_function_originalname(self, pytester: Pytester) -> None: |
| 685 | items = pytester.getitems( |
| 686 | """ |
| 687 | import pytest |
| 688 | |
| 689 | @pytest.mark.parametrize('arg', [1,2]) |
| 690 | def test_func(arg): |
| 691 | pass |
| 692 | |
| 693 | def test_no_param(): |
| 694 | pass |
| 695 | """ |
| 696 | ) |
| 697 | originalnames = [] |
| 698 | for x in items: |
| 699 | assert isinstance(x, pytest.Function) |
| 700 | originalnames.append(x.originalname) |
| 701 | assert originalnames == [ |
| 702 | "test_func", |
| 703 | "test_func", |
| 704 | "test_no_param", |
| 705 | ] |
| 706 | |
| 707 | def test_function_with_square_brackets(self, pytester: Pytester) -> None: |
| 708 | """Check that functions with square brackets don't cause trouble.""" |