diff --git a/tests/testutil.py b/tests/testutil.py index f46b1fcadd55f8562039bbdbc9641758f5d028d9..9534bff4382ead304b93a66256879a0ad1905e69 100644 --- a/tests/testutil.py +++ b/tests/testutil.py @@ -44,9 +44,11 @@ TESTS_DIR = Path(__file__).parent # it with different scopes. Typical usage looks like: # clean_account_meta = pytest.fixture([options])(testutil.clean_account_meta) def clean_account_meta(): - yield - data.Account.load_options_map(bc_options.OPTIONS_DEFAULTS) - data.Account._meta_map.clear() + try: + yield + finally: + data.Account.load_options_map(bc_options.OPTIONS_DEFAULTS) + data.Account._meta_map.clear() def _ods_cell_value_type(cell): assert cell.tagName == 'table:table-cell'