| 786 | result.stdout.fnmatch_lines(["* 3 passed in *"]) |
| 787 | |
| 788 | def test_function_originalname(self, pytester: Pytester) -> None: |
| 789 | items = pytester.getitems( |
| 790 | """ |
| 791 | import pytest |
| 792 | |
| 793 | @pytest.mark.parametrize('arg', [1,2]) |
| 794 | def test_func(arg): |
| 795 | pass |
| 796 | |
| 797 | def test_no_param(): |
| 798 | pass |
| 799 | """ |
| 800 | ) |
| 801 | originalnames = [] |
| 802 | for x in items: |
| 803 | assert isinstance(x, pytest.Function) |
| 804 | originalnames.append(x.originalname) |
| 805 | assert originalnames == [ |
| 806 | "test_func", |
| 807 | "test_func", |
| 808 | "test_no_param", |
| 809 | ] |
| 810 | |
| 811 | def test_function_with_square_brackets(self, pytester: Pytester) -> None: |
| 812 | """Check that functions with square brackets don't cause trouble.""" |