/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_versionedfile.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-12 03:39:10 UTC
  • mfrom: (4103.3.5 progress)
  • Revision ID: pqm@pqm.ubuntu.com-20090312033910-9umj7rwjo98zl7up
(mbp) small progress improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2005, 2009 Canonical Ltd
2
2
#
3
3
# Authors:
4
4
#   Johan Rydberg <jrydberg@gnu.org>
746
746
                self.assertEqual(expected, progress.updates)
747
747
            return lines
748
748
        lines = iter_with_versions(['child', 'otherchild'],
749
 
                                   [('Walking content.', 0, 2),
750
 
                                    ('Walking content.', 1, 2),
751
 
                                    ('Walking content.', 2, 2)])
 
749
                                   [('Walking content', 0, 2),
 
750
                                    ('Walking content', 1, 2),
 
751
                                    ('Walking content', 2, 2)])
752
752
        # we must see child and otherchild
753
753
        self.assertTrue(lines[('child\n', 'child')] > 0)
754
754
        self.assertTrue(lines[('otherchild\n', 'otherchild')] > 0)
755
755
        # we dont care if we got more than that.
756
756
 
757
757
        # test all lines
758
 
        lines = iter_with_versions(None, [('Walking content.', 0, 5),
759
 
                                          ('Walking content.', 1, 5),
760
 
                                          ('Walking content.', 2, 5),
761
 
                                          ('Walking content.', 3, 5),
762
 
                                          ('Walking content.', 4, 5),
763
 
                                          ('Walking content.', 5, 5)])
 
758
        lines = iter_with_versions(None, [('Walking content', 0, 5),
 
759
                                          ('Walking content', 1, 5),
 
760
                                          ('Walking content', 2, 5),
 
761
                                          ('Walking content', 3, 5),
 
762
                                          ('Walking content', 4, 5),
 
763
                                          ('Walking content', 5, 5)])
764
764
        # all lines must be seen at least once
765
765
        self.assertTrue(lines[('base\n', 'base')] > 0)
766
766
        self.assertTrue(lines[('lancestor\n', 'lancestor')] > 0)
2304
2304
            return lines
2305
2305
        lines = iter_with_keys(
2306
2306
            [self.get_simple_key('child'), self.get_simple_key('otherchild')],
2307
 
            [('Walking content.', 0, 2),
2308
 
             ('Walking content.', 1, 2),
2309
 
             ('Walking content.', 2, 2)])
 
2307
            [('Walking content', 0, 2),
 
2308
             ('Walking content', 1, 2),
 
2309
             ('Walking content', 2, 2)])
2310
2310
        # we must see child and otherchild
2311
2311
        self.assertTrue(lines[('child\n', self.get_simple_key('child'))] > 0)
2312
2312
        self.assertTrue(
2315
2315
 
2316
2316
        # test all lines
2317
2317
        lines = iter_with_keys(files.keys(),
2318
 
            [('Walking content.', 0, 5),
2319
 
             ('Walking content.', 1, 5),
2320
 
             ('Walking content.', 2, 5),
2321
 
             ('Walking content.', 3, 5),
2322
 
             ('Walking content.', 4, 5),
2323
 
             ('Walking content.', 5, 5)])
 
2318
            [('Walking content', 0, 5),
 
2319
             ('Walking content', 1, 5),
 
2320
             ('Walking content', 2, 5),
 
2321
             ('Walking content', 3, 5),
 
2322
             ('Walking content', 4, 5),
 
2323
             ('Walking content', 5, 5)])
2324
2324
        # all lines must be seen at least once
2325
2325
        self.assertTrue(lines[('base\n', self.get_simple_key('base'))] > 0)
2326
2326
        self.assertTrue(