~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_registry.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-04 20:44:14 UTC
  • mfrom: (5807.2.2 inventory-tree-tests)
  • Revision ID: pqm@pqm.ubuntu.com-20110504204414-j893hspmx3k1rki4
(jelmer) Skip per_tree tests that are InventoryTree-specific if they're run
 against non-inventory trees. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
215
215
        # We create a registry with "official" objects and "hidden"
216
216
        # objects. The later represent the side effects that led to bug #277048
217
217
        # and #430510
218
 
        _registry = registry.Registry()
 
218
        self.registry =  registry.Registry()
219
219
 
220
220
        def register_more():
221
 
           _registry.register('hidden', None)
 
221
            self.registry.register('hidden', None)
222
222
 
223
 
        # Avoid closing over self by binding local variable
224
 
        self.registry = _registry
225
223
        self.registry.register('passive', None)
226
224
        self.registry.register('active', register_more)
227
225
        self.registry.register('passive-too', None)
231
229
            def get_obj(inner_self):
232
230
                # Surprise ! Getting a registered object (think lazy loaded
233
231
                # module) register yet another object !
234
 
                _registry.register('more hidden', None)
 
232
                self.registry.register('more hidden', None)
235
233
                return inner_self._obj
236
234
 
237
235
        self.registry.register('hacky', None)