setUp must be called on a fixture's parent first
There is some odd behavior when a fixture's setUp fails before it has a change to call the parent's setUp. It causes an error in the error handling and the original exception is lost. The bug has been reported upstream: https://bugs.launchpad.net/python-fixtures/+bug/1299502 Change-Id: I27cbfbe2c8ae34e72950361f8d0d7d8d3e249f8c
This commit is contained in:
parent
a20158766b
commit
b23951b5a0
|
@ -21,6 +21,8 @@ class Cache(fixtures.Fixture):
|
|||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(Cache, self).setUp()
|
||||
|
||||
# NOTE(dstanek): We must remove the existing cache backend in the
|
||||
# setUp instead of the tearDown because it defaults to a no-op cache
|
||||
# and we want the configure call below to create the correct backend.
|
||||
|
@ -32,5 +34,3 @@ class Cache(fixtures.Fixture):
|
|||
|
||||
# ensure the cache region instance is setup
|
||||
cache.configure_cache_region(cache.REGION)
|
||||
|
||||
super(Cache, self).setUp()
|
||||
|
|
Loading…
Reference in New Issue