/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_bundle.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-06-07 16:47:54 UTC
  • mfrom: (1185.82.142 w-changeset)
  • Revision ID: pqm@pqm.ubuntu.com-20060607164754-f5a93b47d5650c8c
Produce better errors for malformed bundles

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib.bundle.read_bundle import BundleTree, BundleReader
23
23
from bzrlib.bundle.serializer import write_bundle
24
24
from bzrlib.diff import internal_diff
25
 
from bzrlib.errors import BzrError, TestamentMismatch
 
25
from bzrlib.errors import BzrError, TestamentMismatch, NotABundle
26
26
from bzrlib.merge import Merge3Merger
27
27
from bzrlib.osutils import has_symlinks, sha_file
28
28
from bzrlib.tests import TestCaseInTempDir, TestCase, TestSkipped
364
364
        self.valid_apply_bundle(base_rev_id, bundle)
365
365
        return bundle 
366
366
 
 
367
    def test_non_bundle(self):
 
368
        self.assertRaises(NotABundle, BundleReader, StringIO('#!/bin/sh\n'))
 
369
 
367
370
    def get_checkout(self, rev_id, checkout_dir=None):
368
371
        """Get a new tree, with the specified revision in it.
369
372
        """