~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

  • Committer: John Arbash Meinel
  • Date: 2009-02-23 15:29:35 UTC
  • mfrom: (3943.7.7 bzr.code_style_cleanup)
  • mto: This revision was merged to the branch mainline in revision 4033.
  • Revision ID: john@arbash-meinel.com-20090223152935-oel9m92mwcc6nb4h
Merge the removal of all trailing whitespace, and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
299
299
        access = self.get_access()
300
300
        memos = access.add_raw_records([('key', 10)], '1234567890')
301
301
        self.assertEqual(['1234567890'], list(access.get_raw_records(memos)))
302
 
 
 
302
 
303
303
    def test_add_several_raw_records(self):
304
304
        """add_raw_records with many records and read some back."""
305
305
        access = self.get_access()
1536
1536
            [('parent',)])])
1537
1537
        # but neither should have added data:
1538
1538
        self.assertEqual([[], [], [], []], self.caught_entries)
1539
 
        
 
1539
 
1540
1540
    def test_add_version_different_dup(self):
1541
1541
        index = self.two_graph_index(deltas=True, catch_adds=True)
1542
1542
        # change options
1548
1548
        self.assertRaises(errors.KnitCorrupt, index.add_records,
1549
1549
            [(('tip',), 'fulltext,no-eol', (None, 0, 100), [])])
1550
1550
        self.assertEqual([], self.caught_entries)
1551
 
        
 
1551
 
1552
1552
    def test_add_versions_nodeltas(self):
1553
1553
        index = self.two_graph_index(catch_adds=True)
1554
1554
        index.add_records([
1596
1596
            [('parent',)])])
1597
1597
        # but neither should have added data.
1598
1598
        self.assertEqual([[], [], [], []], self.caught_entries)
1599
 
        
 
1599
 
1600
1600
    def test_add_versions_different_dup(self):
1601
1601
        index = self.two_graph_index(deltas=True, catch_adds=True)
1602
1602
        # change options
1795
1795
        index.add_records([(('tip',), 'fulltext,no-eol', (None, 0, 1000), [])])
1796
1796
        # but neither should have added data.
1797
1797
        self.assertEqual([[], [], [], []], self.caught_entries)
1798
 
        
 
1798
 
1799
1799
    def test_add_version_different_dup(self):
1800
1800
        index = self.two_graph_index(catch_adds=True)
1801
1801
        # change options
1809
1809
        self.assertRaises(errors.KnitCorrupt, index.add_records,
1810
1810
            [(('tip',), 'fulltext,no-eol', (None, 0, 100), [('parent',)])])
1811
1811
        self.assertEqual([], self.caught_entries)
1812
 
        
 
1812
 
1813
1813
    def test_add_versions(self):
1814
1814
        index = self.two_graph_index(catch_adds=True)
1815
1815
        index.add_records([
1847
1847
        index.add_records([(('tip',), 'fulltext,no-eol', (None, 0, 1000), [])])
1848
1848
        # but neither should have added data.
1849
1849
        self.assertEqual([[], [], [], []], self.caught_entries)
1850
 
        
 
1850
 
1851
1851
    def test_add_versions_different_dup(self):
1852
1852
        index = self.two_graph_index(catch_adds=True)
1853
1853
        # change options
1933
1933
 
1934
1934
    def test_check(self):
1935
1935
        # At the moment checking a stacked knit does implicitly check the
1936
 
        # fallback files.  
 
1936
        # fallback files.
1937
1937
        basis, test = self.get_basis_and_test_knit()
1938
1938
        test.check()
1939
1939
 
2177
2177
 
2178
2178
    def test_iter_lines_added_or_present_in_keys(self):
2179
2179
        # Lines from the basis are returned, and lines for a given key are only
2180
 
        # returned once. 
 
2180
        # returned once.
2181
2181
        key1 = ('foo1',)
2182
2182
        key2 = ('foo2',)
2183
2183
        # all sources are asked for keys: