~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testinv.py

  • Committer: Martin Pool
  • Date: 2005-07-22 23:43:26 UTC
  • Revision ID: mbp@sourcefrog.net-20050722234326-13104af9d837ed2b
todo

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from bzrlib.inventory import Inventory, InventoryEntry
20
20
 
21
 
 
22
21
class TestIsWithin(TestBase):
23
22
    def runTest(self):
24
 
        from bzrlib.osutils import is_inside_any
25
 
        
26
 
        for dirs, fn in [(['src', 'doc'], 'src/foo.c'),
27
 
                         (['src'], 'src/foo.c'),
28
 
                         (['src'], 'src'),
29
 
                         ]:
30
 
            self.assert_(is_inside_any(dirs, fn))
31
 
            
32
 
        for dirs, fn in [(['src'], 'srccontrol'),
33
 
                         (['src'], 'srccontrol/foo')]:
34
 
            self.assertFalse(is_inside_any(dirs, fn))
35
 
            
36
 
            
37
 
            
38
 
class TestInventoryIds(TestBase):
39
 
    def runTest(self):
40
23
        """Test detection of files within selected directories."""
41
24
        inv = Inventory()
42
25
        
51
34
        self.assertEqual(inv.path2id('src/bye.c'), 'bye-id')
52
35
        
53
36
        self.assert_('src-id' in inv)
 
37
        
 
38
        
 
 
b'\\ No newline at end of file'