[Python-3000-checkins] r66563 - python/branches/py3k/Lib/test/test_atexit.py
benjamin.peterson
python-3000-checkins at python.org
Tue Sep 23 05:14:49 CEST 2008
Author: benjamin.peterson
Date: Tue Sep 23 05:14:49 2008
New Revision: 66563
Log:
add a test for bad atexit arguments
Modified:
python/branches/py3k/Lib/test/test_atexit.py
Modified: python/branches/py3k/Lib/test/test_atexit.py
==============================================================================
--- python/branches/py3k/Lib/test/test_atexit.py (original)
+++ python/branches/py3k/Lib/test/test_atexit.py Tue Sep 23 05:14:49 2008
@@ -44,6 +44,10 @@
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)
More information about the Python-3000-checkins
mailing list