@@ -3581,9 +3581,9 @@ def test_show_fixtures(self, pytester: Pytester) -> None:
35813581 result = pytester .runpytest ("--fixtures" )
35823582 result .stdout .fnmatch_lines (
35833583 [
3584- "tmp_path_factory [[]session scope[]] -- .../_pytest/tmpdir.py:*" ,
3584+ "tmp_path_factory* [[]session scope[]] -- .../_pytest/tmpdir.py:*" ,
35853585 "*for the test session*" ,
3586- "tmp_path -- .../_pytest/tmpdir.py:*" ,
3586+ "tmp_path* -- .../_pytest/tmpdir.py:*" ,
35873587 "*temporary directory*" ,
35883588 ]
35893589 )
@@ -3592,9 +3592,9 @@ def test_show_fixtures_verbose(self, pytester: Pytester) -> None:
35923592 result = pytester .runpytest ("--fixtures" , "-v" )
35933593 result .stdout .fnmatch_lines (
35943594 [
3595- "tmp_path_factory [[]session scope[]] -- .../_pytest/tmpdir.py:*" ,
3595+ "tmp_path_factory* [[]session scope[]] -- .../_pytest/tmpdir.py:*" ,
35963596 "*for the test session*" ,
3597- "tmp_path -- .../_pytest/tmpdir.py:*" ,
3597+ "tmp_path* -- .../_pytest/tmpdir.py:*" ,
35983598 "*temporary directory*" ,
35993599 ]
36003600 )
@@ -3614,14 +3614,32 @@ def arg1():
36143614 result = pytester .runpytest ("--fixtures" , p )
36153615 result .stdout .fnmatch_lines (
36163616 """
3617- *tmp_path -- *
3617+ *tmp_path* -- *
36183618 *fixtures defined from*
36193619 *arg1 -- test_show_fixtures_testmodule.py:6*
36203620 *hello world*
36213621 """
36223622 )
36233623 result .stdout .no_fnmatch_line ("*arg0*" )
36243624
3625+ def test_show_fixtures_return_annotation (self , pytester : Pytester ) -> None :
3626+ p = pytester .makepyfile (
3627+ '''
3628+ import pytest
3629+ @pytest.fixture
3630+ def six() -> int:
3631+ return 6
3632+ '''
3633+ )
3634+ result = pytester .runpytest ("--fixtures" , p )
3635+ result .stdout .fnmatch_lines (
3636+ """
3637+ *tmp_path* -- *
3638+ *fixtures defined from*
3639+ *six -> int -- test_show_fixtures_return_annotation.py:3*
3640+ """
3641+ )
3642+
36253643 @pytest .mark .parametrize ("testmod" , [True , False ])
36263644 def test_show_fixtures_conftest (self , pytester : Pytester , testmod ) -> None :
36273645 pytester .makeconftest (
0 commit comments