Skip to content

Commit ebe8c9c

Browse files
committed
Update get_return_annotation test
1 parent c3e0a48 commit ebe8c9c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/_pytest/fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ def _showfixtures_main(config: Config, session: Session) -> None:
20192019
tw.line()
20202020

20212021

2022-
def get_return_annotation(fixture_func: Callable) -> str:
2022+
def get_return_annotation(fixture_func: Callable[..., Any]) -> str:
20232023
try:
20242024
sig = signature(fixture_func)
20252025
annotation = sig.return_annotation

testing/python/fixtures.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5097,7 +5097,7 @@ def six() -> int:
50975097
def two_sixes() -> tuple[int, str]:
50985098
return (6, "six")
50995099

5100-
assert get_return_annotation(two_sixes) == "Tuple[int, str]"
5100+
assert get_return_annotation(two_sixes) == "tuple[int, str]"
51015101

51025102
def no_annot():
51035103
return 6
@@ -5108,3 +5108,5 @@ def none_return() -> None:
51085108
pass
51095109

51105110
assert get_return_annotation(none_return) == "None"
5111+
5112+
assert get_return_annotation(range) == ""

0 commit comments

Comments
 (0)