[Python-Dev] okay to add new test cases to 2.6?

skip at pobox.com skip at pobox.com
Tue Sep 23 22:00:28 CEST 2008

Benjamin Peterson wound up writing a test case for the new C atexit module
on the py3k branch.  A similar test, though different in detail, makes sense
for the Python atexit module on trunk.  Is this something I can check in or
should I just wait until after 2.6 is released?

    def test_badargs(self):
        s = StringIO.StringIO()
        sys.stdout = sys.stderr = s
        save_handlers = atexit._exithandlers
        atexit._exithandlers = []
            atexit.register(lambda: 1, 0, 0, (x for x in (1,2)), 0, 0)
            self.assertRaises(TypeError, atexit._run_exitfuncs)
            sys.stdout = sys.__stdout__
            sys.stderr = sys.__stderr__
            atexit._exithandlers = save_handlers



More information about the Python-Dev mailing list