~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lazy_import.py

  • Committer: John Arbash Meinel
  • Date: 2009-02-23 15:29:35 UTC
  • mfrom: (3943.7.7 bzr.code_style_cleanup)
  • mto: This revision was merged to the branch mainline in revision 4033.
  • Revision ID: john@arbash-meinel.com-20090223152935-oel9m92mwcc6nb4h
Merge the removal of all trailing whitespace, and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
 
108
108
    def test_object(self):
109
109
        """ScopeReplacer can create an instance in local scope.
110
 
        
 
110
 
111
111
        An object should appear in globals() by constructing a ScopeReplacer,
112
112
        and it will be replaced with the real object upon the first request.
113
113
        """
351
351
                         object.__getattribute__(test_obj2, '__class__'))
352
352
        self.assertEqual(InstrumentedReplacer,
353
353
                         object.__getattribute__(test_obj3, '__class__'))
354
 
        
 
354
 
355
355
        # The first use of the alternate variable causes test_obj2 to
356
356
        # be replaced.
357
357
        self.assertEqual('foo', test_obj3.foo(1))
369
369
        # because only now are we able to detect the problem.
370
370
        self.assertRaises(errors.IllegalUseOfScopeReplacer,
371
371
                          getattr, test_obj3, 'foo')
372
 
        
 
372
 
373
373
        self.assertEqual([('__getattribute__', 'foo'),
374
374
                          '_replace',
375
375
                          'factory',