From 9d3650fdfb908392b626c4e2a3b2964e589bfc57 Mon Sep 17 00:00:00 2001 From: AlexWaygood Date: Tue, 19 Apr 2022 17:38:32 +0100 Subject: [PATCH] Correct comment, add a few more cases --- test_cases/stdlib/test_builtins.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test_cases/stdlib/test_builtins.py b/test_cases/stdlib/test_builtins.py index 097d46ae895d..cc200a3b5a5a 100644 --- a/test_cases/stdlib/test_builtins.py +++ b/test_cases/stdlib/test_builtins.py @@ -47,9 +47,14 @@ def __reduce__(self) -> Union[str, Tuple[Any, ...]]: # # int for positive 2nd-arg, float otherwise assert_type(pow(4, 65), Any) +assert_type(pow(2, -45), Any) assert_type(pow(3, 57, None), Any) -# float for positive 2nd-arg, complex otherwise +# pow(, ) -> float +# pow(, ) -> complex assert_type(pow(4.7, 7.4), Any) +assert_type(pow(-9.8, 8.3), Any) +assert_type(pow(-9.3, -88.2), Any) +assert_type(pow(8.2, -9.8), Any) assert_type(pow(4.7, 9.2, None), Any) assert_type((6.2).__pow__(5.2, None), Any) # See #7046 -- float for a positive 1st arg, complex otherwise