Skip to content

Commit ec239a4

Browse files
committed
Update get_return_annotation test
1 parent 2efc48e commit ec239a4

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
@@ -2015,7 +2015,7 @@ def _showfixtures_main(config: Config, session: Session) -> None:
20152015
tw.line()
20162016

20172017

2018-
def get_return_annotation(fixture_func: Callable) -> str:
2018+
def get_return_annotation(fixture_func: Callable[..., Any]) -> str:
20192019
try:
20202020
sig = signature(fixture_func)
20212021
annotation = sig.return_annotation

testing/python/fixtures.py

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

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

51035103
def no_annot():
51045104
return 6
@@ -5109,3 +5109,5 @@ def none_return() -> None:
51095109
pass
51105110

51115111
assert get_return_annotation(none_return) == "None"
5112+
5113+
assert get_return_annotation(range) == ""

0 commit comments

Comments
 (0)