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 = [] try: atexit.register(lambda: 1, 0, 0, (x for x in (1,2)), 0, 0) self.assertRaises(TypeError, atexit._run_exitfuncs) finally: sys.stdout = sys.__stdout__ sys.stderr = sys.__stderr__ atexit._exithandlers = save_handlers Thx, Skip
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sep 23, 2008, at 4:00 PM, skip@pobox.com wrote:
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 = [] try: atexit.register(lambda: 1, 0, 0, (x for x in (1,2)), 0, 0) self.assertRaises(TypeError, atexit._run_exitfuncs) finally: sys.stdout = sys.__stdout__ sys.stderr = sys.__stderr__ atexit._exithandlers = save_handlers
If you don't increase the redness of the buildbots, I think it's fine. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iQCVAwUBSNlSHXEjvBPtnXfVAQKQ3gP/XJr97CdjZitwSQxrL28xCuLyPfKmtBVA 2hK2ewQxH9Rxrl0BsFZlnBz2vEygPmPWnduu8VT+sjsrFu/Ua9d1Xo06lQ6/fFck Tp/en0KlAyJ6Pjf/1pWahn4ttwk74YG02LiQgUsfOaIUG+8cMfGfrtyUzwGBoKhW 4RBuwpPjsBo= =7Brm -----END PGP SIGNATURE-----
participants (2)
-
Barry Warsaw
-
skip@pobox.com