~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tools/testweave.py

  • Committer: Martin Pool
  • Date: 2005-07-11 02:55:35 UTC
  • Revision ID: mbp@sourcefrog.net-20050711025535-0990d4c48dce9542
- update testweave

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
 
25
25
import testsweet
26
 
from weave import Weave, WeaveFormatError
 
26
from bzrlib.weave import Weave, WeaveFormatError
 
27
from bzrlib.weavefile import write_weave, read_weave
27
28
from pprint import pformat
28
29
 
29
30
 
50
51
    def check_read_write(self, k):
51
52
        """Check the weave k can be written & re-read."""
52
53
        from tempfile import TemporaryFile
53
 
        from weavefile import write_weave, read_weave
54
54
        tf = TemporaryFile()
55
55
 
56
56
        write_weave(k, tf)
143
143
    def runTest(self):
144
144
        k = Weave()
145
145
 
146
 
        self.assertRaises(IndexError,
 
146
        self.assertRaises(ValueError,
147
147
                          k.add,
148
148
                          [69],
149
149
                          ['new text!'])