A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-September/082531.html below:

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

[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 = []
        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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4