~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_inventory/basics.py

  • Committer: Martin Pool
  • Date: 2011-06-14 02:21:41 UTC
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110614022141-18hmm7s0iw3utcbj
Deprecate __contains__ on Tree and Inventory

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
from bzrlib.tests.per_inventory import TestCaseWithInventory
37
37
 
 
38
from bzrlib.symbol_versioning import (
 
39
    deprecated_in,
 
40
    )
38
41
 
39
42
 
40
43
class TestInventory(TestCaseWithInventory):
149
152
        inv = self.inv_to_test_inv(inv)
150
153
        self.assertEqual(inv.path2id('src'), 'src-id')
151
154
        self.assertEqual(inv.path2id('src/bye.c'), 'bye-id')
152
 
        self.assertTrue('src-id' in inv)
 
155
        self.assertTrue(
 
156
            self.applyDeprecated(
 
157
                deprecated_in((2, 4, 0)),
 
158
                inv.__contains__, 'src-id'))
153
159
 
154
160
    def test_non_directory_children(self):
155
161
        """Test path2id when a parent directory has no children"""