equal
deleted
inserted
replaced
361 @contextmanager |
361 @contextmanager |
362 def temporary_appobjects(self, *appobjects): |
362 def temporary_appobjects(self, *appobjects): |
363 self.vreg._loadedmods.setdefault(self.__module__, {}) |
363 self.vreg._loadedmods.setdefault(self.__module__, {}) |
364 for obj in appobjects: |
364 for obj in appobjects: |
365 self.vreg.register(obj) |
365 self.vreg.register(obj) |
366 yield |
366 try: |
367 for obj in appobjects: |
367 yield |
368 self.vreg.unregister(obj) |
368 finally: |
|
369 for obj in appobjects: |
|
370 self.vreg.unregister(obj) |
369 |
371 |
370 # vregistry inspection utilities ########################################### |
372 # vregistry inspection utilities ########################################### |
371 |
373 |
372 def pviews(self, req, rset): |
374 def pviews(self, req, rset): |
373 return sorted((a.__regid__, a.__class__) |
375 return sorted((a.__regid__, a.__class__) |