mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-35252: Remove FIXME from test_functools (GH-10551)
This commit is contained in:
parent
287b84de93
commit
d673810b9d
3 changed files with 11 additions and 9 deletions
|
@ -2355,9 +2355,6 @@ class TestSingleDispatch(unittest.TestCase):
|
|||
))
|
||||
self.assertTrue(str(exc.exception).endswith(msg_suffix))
|
||||
|
||||
# FIXME: The following will only work after PEP 560 is implemented.
|
||||
return
|
||||
|
||||
with self.assertRaises(TypeError) as exc:
|
||||
@i.register
|
||||
def _(arg: typing.Iterable[str]):
|
||||
|
@ -2366,10 +2363,12 @@ class TestSingleDispatch(unittest.TestCase):
|
|||
# types from `typing`. Instead, annotate with regular types
|
||||
# or ABCs.
|
||||
return "I annotated with a generic collection"
|
||||
self.assertTrue(str(exc.exception).startswith(msg_prefix +
|
||||
"<function TestSingleDispatch.test_invalid_registrations.<locals>._"
|
||||
self.assertTrue(str(exc.exception).startswith(
|
||||
"Invalid annotation for 'arg'."
|
||||
))
|
||||
self.assertTrue(str(exc.exception).endswith(
|
||||
'typing.Iterable[str] is not a class.'
|
||||
))
|
||||
self.assertTrue(str(exc.exception).endswith(msg_suffix))
|
||||
|
||||
def test_invalid_positional_argument(self):
|
||||
@functools.singledispatch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue