~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

  • Committer: Robert Collins
  • Date: 2010-06-28 02:41:22 UTC
  • mto: This revision was merged to the branch mainline in revision 5324.
  • Revision ID: robertc@robertcollins.net-20100628024122-g951fzp74f3u6wst
Sanity check that new_trace_file in pop_log_file is valid, and also fix a test that monkey patched get_terminal_encoding.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    osutils,
27
27
    pack,
28
28
    tests,
29
 
    transport,
30
29
    tuned_gzip,
31
30
    )
32
31
from bzrlib.errors import (
54
53
    TestCaseWithTransport,
55
54
    TestNotApplicable,
56
55
    )
 
56
from bzrlib.transport import get_transport
57
57
from bzrlib.versionedfile import (
58
58
    AbsentContentFactory,
59
59
    ConstantMapper,
1571
1571
        # could leave an empty .kndx file, which bzr would later claim was a
1572
1572
        # corrupted file since the header was not present. In reality, the file
1573
1573
        # just wasn't created, so it should be ignored.
1574
 
        t = transport.get_transport('.')
 
1574
        t = get_transport('.')
1575
1575
        t.put_bytes('test.kndx', '')
1576
1576
 
1577
1577
        knit = self.make_test_knit()
1578
1578
 
1579
1579
    def test_knit_index_checks_header(self):
1580
 
        t = transport.get_transport('.')
 
1580
        t = get_transport('.')
1581
1581
        t.put_bytes('test.kndx', '# not really a knit header\n\n')
1582
1582
        k = self.make_test_knit()
1583
1583
        self.assertRaises(KnitHeaderError, k.keys)