testing/example_scripts/fixtures/fill_fixtures/test_funcarg_lookup_modulelevel.py
raw| 1 | # mypy: allow-untyped-defs |
| 2 | from __future__ import annotations |
| 3 | |
| 4 | import pytest |
| 5 | |
| 6 | |
| 7 | @pytest.fixture |
| 8 | def something(request): |
| 9 | return request.function.__name__ |
| 10 | |
| 11 | |
| 12 | class TestClass: |
| 13 | def test_method(self, something): |
| 14 | assert something == "test_method" |
| 15 | |
| 16 | |
| 17 | def test_func(something): |
| 18 | assert something == "test_func" |