diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-09-23 03:14:49 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-09-23 03:14:49 (GMT) |
commit | b8401c7cb175fdb4584fce8b847de5e8b7e15034 (patch) | |
tree | 90b24b3fe01bceb8f4c7d2bc5a5ac314102a9721 | |
parent | 711552bb40f7a9f74139963a9822b49d853aee31 (diff) | |
download | cpython-b8401c7cb175fdb4584fce8b847de5e8b7e15034.zip cpython-b8401c7cb175fdb4584fce8b847de5e8b7e15034.tar.gz cpython-b8401c7cb175fdb4584fce8b847de5e8b7e15034.tar.bz2 |
add a test for bad atexit arguments
-rw-r--r-- | Lib/test/test_atexit.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py index 6856042..04af9fb 100644 --- a/Lib/test/test_atexit.py +++ b/Lib/test/test_atexit.py @@ -44,6 +44,10 @@ class TestCase(unittest.TestCase): self.assertEqual(self.stream.getvalue(), "h4 (4,) {'kw': 'abc'}\nh4 () {}\nh1\n") + def test_badargs(self): + atexit.register(lambda: 1, 0, 0, (x for x in (1,2)), 0, 0) + self.assertRaises(TypeError, atexit._run_exitfuncs) + def test_order(self): # be sure handlers are executed in reverse order atexit.register(h1) |