add a test for bad atexit arguments
This commit is contained in:
parent
711552bb40
commit
b8401c7cb1
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue