unittest exits

jhermann Juergen.Hermann at 1und1.de
Wed Nov 19 06:44:33 EST 2008


On 13 Nov., 20:20, "Chris Rebert" <c... at rebertia.com> wrote:
> try:
>     unittest.main()
> except SystemExit:
>     pass

You most probably want this instead:

    try:
        unittest.main()
    except SystemExit, exc:
        # only exit if tests failed
        if exc.code:
            raise



More information about the Python-list mailing list