~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testinv.py

  • Committer: Robert Collins
  • Date: 2005-08-23 10:44:48 UTC
  • mto: (974.1.50) (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1139.
  • Revision ID: robertc@robertcollins.net-20050823104448-fb5d448e7a5a8ee3
relace runTest with test_foo in blackbox tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from bzrlib.inventory import Inventory, InventoryEntry
20
20
 
21
21
 
22
 
class TestInventory(TestCase):
23
 
 
24
 
    def test_is_within(self):
 
22
class TestIsWithin(TestCase):
 
23
    def runTest(self):
25
24
        from bzrlib.osutils import is_inside_any
26
25
        
27
26
        for dirs, fn in [(['src', 'doc'], 'src/foo.c'),
34
33
                         (['src'], 'srccontrol/foo')]:
35
34
            self.assertFalse(is_inside_any(dirs, fn))
36
35
            
37
 
    def test_ids(self):
 
36
            
 
37
            
 
38
class TestInventoryIds(TestCase):
 
39
    def runTest(self):
38
40
        """Test detection of files within selected directories."""
39
41
        inv = Inventory()
40
42
        
49
51
        self.assertEqual(inv.path2id('src/bye.c'), 'bye-id')
50
52
        
51
53
        self.assert_('src-id' in inv)
52
 
 
53
 
 
54
 
    def test_version(self):
55
 
        """Inventory remembers the text's version."""
56
 
        inv = Inventory()
57
 
        ie = inv.add_path('foo.txt', 'file')
58
 
        ## XXX
59