diff options
Diffstat (limited to 'lib/sqlalchemy/testing/config.py')
-rw-r--r-- | lib/sqlalchemy/testing/config.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/config.py b/lib/sqlalchemy/testing/config.py index 140f5f782..e97821d72 100644 --- a/lib/sqlalchemy/testing/config.py +++ b/lib/sqlalchemy/testing/config.py @@ -150,6 +150,14 @@ class Config(object): cls.set_as_current(config, namespace) @classmethod + def pop(cls, namespace): + if cls._stack: + # a failed test w/ -x option can call reset() ahead of time + _current = cls._stack[-1] + del cls._stack[-1] + cls.set_as_current(_current, namespace) + + @classmethod def reset(cls, namespace): if cls._stack: cls.set_as_current(cls._stack[0], namespace) |