@@ -3581,9 +3581,9 @@ def test_show_fixtures(self, pytester: Pytester) -> None:
3581
3581
result = pytester .runpytest ("--fixtures" )
3582
3582
result .stdout .fnmatch_lines (
3583
3583
[
3584
- "tmp_path_factory [[]session scope[]] -- .../_pytest/tmpdir.py:*" ,
3584
+ "tmp_path_factory* [[]session scope[]] -- .../_pytest/tmpdir.py:*" ,
3585
3585
"*for the test session*" ,
3586
- "tmp_path -- .../_pytest/tmpdir.py:*" ,
3586
+ "tmp_path* -- .../_pytest/tmpdir.py:*" ,
3587
3587
"*temporary directory*" ,
3588
3588
]
3589
3589
)
@@ -3592,9 +3592,9 @@ def test_show_fixtures_verbose(self, pytester: Pytester) -> None:
3592
3592
result = pytester .runpytest ("--fixtures" , "-v" )
3593
3593
result .stdout .fnmatch_lines (
3594
3594
[
3595
- "tmp_path_factory [[]session scope[]] -- .../_pytest/tmpdir.py:*" ,
3595
+ "tmp_path_factory* [[]session scope[]] -- .../_pytest/tmpdir.py:*" ,
3596
3596
"*for the test session*" ,
3597
- "tmp_path -- .../_pytest/tmpdir.py:*" ,
3597
+ "tmp_path* -- .../_pytest/tmpdir.py:*" ,
3598
3598
"*temporary directory*" ,
3599
3599
]
3600
3600
)
@@ -3614,14 +3614,32 @@ def arg1():
3614
3614
result = pytester .runpytest ("--fixtures" , p )
3615
3615
result .stdout .fnmatch_lines (
3616
3616
"""
3617
- *tmp_path -- *
3617
+ *tmp_path* -- *
3618
3618
*fixtures defined from*
3619
3619
*arg1 -- test_show_fixtures_testmodule.py:6*
3620
3620
*hello world*
3621
3621
"""
3622
3622
)
3623
3623
result .stdout .no_fnmatch_line ("*arg0*" )
3624
3624
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
+
3625
3643
@pytest .mark .parametrize ("testmod" , [True , False ])
3626
3644
def test_show_fixtures_conftest (self , pytester : Pytester , testmod ) -> None :
3627
3645
pytester .makeconftest (
0 commit comments