~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_ignores.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-26 10:49:57 UTC
  • mfrom: (4987.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100126104957-dmtqnc0pckuruyla
(vila,
        jam) Implement TestCase.overrideAttr to simplify tests setUp/cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
    def setUp(self):
133
133
        TestCase.setUp(self)
134
134
 
135
 
        orig = ignores._runtime_ignores
136
 
        def restore():
137
 
            ignores._runtime_ignores = orig
138
 
        self.addCleanup(restore)
139
135
        # For the purposes of these tests, we must have no
140
136
        # runtime ignores
141
 
        ignores._runtime_ignores = set()
 
137
        self.overrideAttr(ignores, '_runtime_ignores', set())
142
138
 
143
139
    def test_add(self):
144
140
        """Test that we can add an entry to the list."""