dogpile.cache icon indicating copy to clipboard operation
dogpile.cache copied to clipboard

tests.cache._fixtures._GenericBackendFixture breaks on `tearDown` if the region has args.

Open sqlalchemy-bot opened this issue 9 years ago • 0 comments

Migrated issue, originally created by jvanasco (jvanasco)

If the region's class has region_args set, tearDown breaks.

    def tearDown(self):
        if self._region_inst:
-           for key in self._keys:
+           for key in self._keys.copy():  # iterate over a copy, otherwise the dict changes
                self._region_inst.delete(key)
            self._keys.clear()
        elif self._backend_inst:
            self._backend_inst.delete("some_key")

The tearDown is also oversimplified -- it doesn't track or teardown the created keys.. just this example key.

sqlalchemy-bot avatar Oct 20 '15 18:10 sqlalchemy-bot