fix issue322: tearDownClass is not run if setUpClass failed. Thanks
Mathieu Agopian for fixing. The patch moves handling setUpClass into a new autofixture. (XXX impl-decide if rather adding addfinalizer() API to node's would have a similar effect)
This commit is contained in:
parent
7fc0d45a4c
commit
b2ebb80878
|
@ -1,6 +1,11 @@
|
|||
Changes between 2.3.5 and 2.4.DEV
|
||||
-----------------------------------
|
||||
|
||||
- fix issue322: tearDownClass is not run if setUpClass failed. Thanks
|
||||
Mathieu Agopian for fixing. The patch moves handling setUpClass
|
||||
into a new autofixture. (XXX impl-decide if rather adding addfinalizer()
|
||||
API to node's would have a similar effect)
|
||||
|
||||
- fix issue336: autouse fixture in plugins should work again.
|
||||
|
||||
- change to use hyphen-separated long options but keep the old spelling
|
||||
|
|
|
@ -28,7 +28,8 @@ def _xunit_setUpClass(request):
|
|||
return # skipped
|
||||
setup = getattr(request.cls, 'setUpClass', None)
|
||||
teardown = getattr(request.cls, 'tearDownClass', None)
|
||||
setup()
|
||||
if setup is not None:
|
||||
setup()
|
||||
if teardown is not None:
|
||||
request.addfinalizer(teardown)
|
||||
|
||||
|
|
Loading…
Reference in New Issue