#20291 closed New feature (duplicate)
Add method to reload `AppCache`
Reported by: | Vlastimil Zíma | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Some tests require test application, e.g. proxy_model_inheritance. Adding test application is simple, but removing is not so simple.
I propose addition of new method which would clean caches and repopulate them.
def reload(self): # Clean cache self._get_models_cache.clear() self.handled.clear() # Mark cache is empty self.loaded = False # Populate cache again self._populate()
Note:
See TracTickets
for help on using tickets.
I'm deeply skeptical that this'll actually work. The real answer here is the app-refactor work, which is still ongoing; this is effectively a duplicate of that.