Ticket #2899 (closed defect: fixed )

Opened 2 years ago

Last modified 2 years ago

addCleanup should run even if setUp fails.

Reported by: jml Assigned to: jml
Type: defect Priority: highest
Milestone: Component: trial
Keywords: Cc: therve
Branch: branches/addCleanup-2899 Author:
Launchpad Bug:

Description

Currently, Trial's TestCase provides no way to add tear-down code that runs if setUp fails (pyunit shares this bug). addCleanup, being a new method, should add cleanup functions that run even if tearDown does not.

Attachments

Change History

  2007-11-14 15:47:37+00:00 changed by jml

  • branch set to branches/addCleanup-2899

(In [21763]) Branching to 'addCleanup-2899'

  2007-11-14 16:01:38+00:00 changed by jml

  • keywords set to review
  • owner deleted
  • priority changed from high to highest

  2007-11-14 18:08:55+00:00 changed by therve

  • owner set to therve

  2007-11-14 19:13:01+00:00 changed by therve

  • cc set to therve
  • keywords deleted
  • owner changed from therve to jml

Thank you pyflakes:

twisted/trial/test/test_tests.py:704: undefined name 'SkipTest'

Otherwise, that looks good :).

  2007-11-14 21:48:15+00:00 changed by jml

  • status changed from new to closed
  • resolution set to fixed

(In [21787]) Make cleanup methods added with addCleanup run even if setUp fails.

  • Author: jml
  • Reviewer: therve
  • Fixes #2899

Previously, addCleanup cleanup methods ran only if setUp succeeded.

Note: See TracTickets for help on using tickets.