bpo-30534: Fixed error messages when pass keyword arguments (#1901)

to functions implemented in C that don't support this.

Also unified error messages for functions that don't take positional or keyword
arguments.
This commit is contained in:
Serhiy Storchaka 2017-06-06 18:45:22 +03:00 committed by GitHub
parent 5cefb6cfdd
commit 5eb788bf7f
5 changed files with 116 additions and 45 deletions

View file

@ -1996,7 +1996,7 @@ class SubclassWithKwargsTest(unittest.TestCase):
Subclass(newarg=1)
except TypeError as err:
# we expect type errors because of wrong argument count
self.assertNotIn("does not take keyword arguments", err.args[0])
self.assertNotIn("keyword arguments", err.args[0])
@support.cpython_only
class SizeofTest(unittest.TestCase):