@@ -3582,9 +3582,9 @@ def test_show_fixtures(self, pytester: Pytester) -> None:
35823582 result = pytester .runpytest ("--fixtures" )
35833583 result .stdout .fnmatch_lines (
35843584 [
3585- "tmp_path_factory [[]session scope[]] -- .../_pytest/tmpdir.py:*" ,
3585+ "tmp_path_factory* [[]session scope[]] -- .../_pytest/tmpdir.py:*" ,
35863586 "*for the test session*" ,
3587- "tmp_path -- .../_pytest/tmpdir.py:*" ,
3587+ "tmp_path* -- .../_pytest/tmpdir.py:*" ,
35883588 "*temporary directory*" ,
35893589 ]
35903590 )
@@ -3593,9 +3593,9 @@ def test_show_fixtures_verbose(self, pytester: Pytester) -> None:
35933593 result = pytester .runpytest ("--fixtures" , "-v" )
35943594 result .stdout .fnmatch_lines (
35953595 [
3596- "tmp_path_factory [[]session scope[]] -- .../_pytest/tmpdir.py:*" ,
3596+ "tmp_path_factory* [[]session scope[]] -- .../_pytest/tmpdir.py:*" ,
35973597 "*for the test session*" ,
3598- "tmp_path -- .../_pytest/tmpdir.py:*" ,
3598+ "tmp_path* -- .../_pytest/tmpdir.py:*" ,
35993599 "*temporary directory*" ,
36003600 ]
36013601 )
@@ -3615,14 +3615,32 @@ def arg1():
36153615 result = pytester .runpytest ("--fixtures" , p )
36163616 result .stdout .fnmatch_lines (
36173617 """
3618- *tmp_path -- *
3618+ *tmp_path* -- *
36193619 *fixtures defined from*
36203620 *arg1 -- test_show_fixtures_testmodule.py:6*
36213621 *hello world*
36223622 """
36233623 )
36243624 result .stdout .no_fnmatch_line ("*arg0*" )
36253625
3626+ def test_show_fixtures_return_annotation (self , pytester : Pytester ) -> None :
3627+ p = pytester .makepyfile (
3628+ '''
3629+ import pytest
3630+ @pytest.fixture
3631+ def six() -> int:
3632+ return 6
3633+ '''
3634+ )
3635+ result = pytester .runpytest ("--fixtures" , p )
3636+ result .stdout .fnmatch_lines (
3637+ """
3638+ *tmp_path* -- *
3639+ *fixtures defined from*
3640+ *six -> int -- test_show_fixtures_return_annotation.py:3*
3641+ """
3642+ )
3643+
36263644 @pytest .mark .parametrize ("testmod" , [True , False ])
36273645 def test_show_fixtures_conftest (self , pytester : Pytester , testmod ) -> None :
36283646 pytester .makeconftest (
0 commit comments