diff options
author | Lysandros Nikolaou <lisandrosnik@gmail.com> | 2019-05-19 22:11:21 (GMT) |
---|---|---|
committer | Ćukasz Langa <lukasz@langa.pl> | 2019-05-19 22:11:20 (GMT) |
commit | d673810b9d9df6fbd29f5b7db3973d5adae10fd3 (patch) | |
tree | 0728ce5ebbc148751ee1e11dcfff333004bd246b /Lib/test | |
parent | 287b84de939db47aa8c6f30734ceb8aba9d1db29 (diff) | |
download | cpython-d673810b9d9df6fbd29f5b7db3973d5adae10fd3.zip cpython-d673810b9d9df6fbd29f5b7db3973d5adae10fd3.tar.gz cpython-d673810b9d9df6fbd29f5b7db3973d5adae10fd3.tar.bz2 |
bpo-35252: Remove FIXME from test_functools (GH-10551)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_functools.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 85c65d1..b89d779 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -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 |