summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_functools.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_functools.py')
-rw-r--r--Lib/test/test_functools.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
index 2245b97..e325480 100644
--- a/Lib/test/test_functools.py
+++ b/Lib/test/test_functools.py
@@ -2187,6 +2187,13 @@ class TestSingleDispatch(unittest.TestCase):
))
self.assertTrue(str(exc.exception).endswith(msg_suffix))
+ def test_invalid_positional_argument(self):
+ @functools.singledispatch
+ def f(*args):
+ pass
+ msg = 'f requires at least 1 positional argument'
+ with self.assertRaisesRegexp(TypeError, msg):
+ f()
if __name__ == '__main__':
unittest.main()