~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testinv.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-08-21 00:08:08 UTC
  • mto: (1092.1.41) (1185.3.4)
  • mto: This revision was merged to the branch mainline in revision 1110.
  • Revision ID: aaron.bentley@utoronto.ca-20050821000808-2a0e6ef95b1bca59
Changed copy_multi to permit failure and return a tuple, tested missing required revisions

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
 
21
22
class TestIsWithin(TestBase):
22
23
    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):
23
40
        """Test detection of files within selected directories."""
24
41
        inv = Inventory()
25
42
        
34
51
        self.assertEqual(inv.path2id('src/bye.c'), 'bye-id')
35
52
        
36
53
        self.assert_('src-id' in inv)
37
 
        
38
 
        
 
 
b'\\ No newline at end of file'