~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

  • Committer: Vincent Ladeuil
  • Date: 2012-03-13 17:25:29 UTC
  • mfrom: (6499 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6501.
  • Revision ID: v.ladeuil+lp@free.fr-20120313172529-i0suyjnepsor25i7
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
    network_bytes_to_kind_and_offset,
63
63
    RecordingVersionedFilesDecorator,
64
64
    )
65
 
 
66
 
 
67
 
compiled_knit_feature = tests.ModuleAvailableFeature(
68
 
                            'bzrlib._knit_load_data_pyx')
 
65
from bzrlib.tests import (
 
66
    features,
 
67
    )
 
68
 
 
69
 
 
70
compiled_knit_feature = features.ModuleAvailableFeature(
 
71
    'bzrlib._knit_load_data_pyx')
69
72
 
70
73
 
71
74
class KnitContentTestsMixin(object):
1600
1603
        # could leave an empty .kndx file, which bzr would later claim was a
1601
1604
        # corrupted file since the header was not present. In reality, the file
1602
1605
        # just wasn't created, so it should be ignored.
1603
 
        t = transport.get_transport('.')
 
1606
        t = transport.get_transport_from_path('.')
1604
1607
        t.put_bytes('test.kndx', '')
1605
1608
 
1606
1609
        knit = self.make_test_knit()
1607
1610
 
1608
1611
    def test_knit_index_checks_header(self):
1609
 
        t = transport.get_transport('.')
 
1612
        t = transport.get_transport_from_path('.')
1610
1613
        t.put_bytes('test.kndx', '# not really a knit header\n\n')
1611
1614
        k = self.make_test_knit()
1612
1615
        self.assertRaises(KnitHeaderError, k.keys)