Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#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()

Change History (4)

comment:1 by Jacob, 12 years ago

Resolution: duplicate
Status: newclosed

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.

comment:2 by Vlastimil Zíma, 12 years ago

Is there a ticket for that? I can't find any relevant one.

comment:3 by Aymeric Augustin, 12 years ago

That's #3591.

comment:4 by Vlastimil Zíma, 12 years ago

Thanks

Note: See TracTickets for help on using tickets.
Back to Top