summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_call.py11
-rw-r--r--Lib/test/test_getargs2.py8
2 files changed, 11 insertions, 8 deletions
diff --git a/Lib/test/test_call.py b/Lib/test/test_call.py
index 45b34e4..75a4a9f 100644
--- a/Lib/test/test_call.py
+++ b/Lib/test/test_call.py
@@ -160,19 +160,22 @@ class CFunctionCallsErrorMessages(unittest.TestCase):
msg = r"^from_bytes\(\) takes at most 2 positional arguments \(3 given\)"
self.assertRaisesRegex(TypeError, msg, int.from_bytes, b'a', 'little', False)
- def test_varargs4(self):
+ def test_varargs1min(self):
msg = r"get expected at least 1 argument, got 0"
self.assertRaisesRegex(TypeError, msg, {}.get)
- def test_varargs5(self):
+ msg = r"expected 1 argument, got 0"
+ self.assertRaisesRegex(TypeError, msg, {}.__delattr__)
+
+ def test_varargs2min(self):
msg = r"getattr expected at least 2 arguments, got 0"
self.assertRaisesRegex(TypeError, msg, getattr)
- def test_varargs6(self):
+ def test_varargs1max(self):
msg = r"input expected at most 1 argument, got 2"
self.assertRaisesRegex(TypeError, msg, input, 1, 2)
- def test_varargs7(self):
+ def test_varargs2max(self):
msg = r"get expected at most 2 arguments, got 3"
self.assertRaisesRegex(TypeError, msg, {}.get, 1, 2, 3)
diff --git a/Lib/test/test_getargs2.py b/Lib/test/test_getargs2.py
index 44a01a4..d9bcb1d 100644
--- a/Lib/test/test_getargs2.py
+++ b/Lib/test/test_getargs2.py
@@ -682,11 +682,11 @@ class PositionalOnlyAndKeywords_TestCase(unittest.TestCase):
self.assertEqual(self.getargs(1), (1, -1, -1))
# required positional arg missing
with self.assertRaisesRegex(TypeError,
- r"function takes at least 1 positional arguments \(0 given\)"):
+ r"function takes at least 1 positional argument \(0 given\)"):
self.getargs()
with self.assertRaisesRegex(TypeError,
- r"function takes at least 1 positional arguments \(0 given\)"):
+ r"function takes at least 1 positional argument \(0 given\)"):
self.getargs(keyword=3)
def test_empty_keyword(self):
@@ -1112,7 +1112,7 @@ class ParseTupleAndKeywords_Test(unittest.TestCase):
parse((1,), {'a': 3}, 'OOO', ['', '', 'a'])
parse((1,), {}, 'O|OO', ['', '', 'a'])
with self.assertRaisesRegex(TypeError,
- r'function takes at least 1 positional arguments \(0 given\)'):
+ r'function takes at least 1 positional argument \(0 given\)'):
parse((), {}, 'O|OO', ['', '', 'a'])
parse((1, 2), {'a': 3}, 'OO$O', ['', '', 'a'])
with self.assertRaisesRegex(TypeError,
@@ -1120,7 +1120,7 @@ class ParseTupleAndKeywords_Test(unittest.TestCase):
parse((1,), {'a': 3}, 'OO$O', ['', '', 'a'])
parse((1,), {}, 'O|O$O', ['', '', 'a'])
with self.assertRaisesRegex(TypeError,
- r'function takes at least 1 positional arguments \(0 given\)'):
+ r'function takes at least 1 positional argument \(0 given\)'):
parse((), {}, 'O|O$O', ['', '', 'a'])
with self.assertRaisesRegex(SystemError, r'Empty parameter name after \$'):
parse((1,), {}, 'O|$OO', ['', '', 'a'])