~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/test_baz_import.py

  • Committer: Aaron Bentley
  • Date: 2006-11-23 18:06:43 UTC
  • Revision ID: abentley@panoramicfeedback.com-20061123180643-6ry3xqozdbn4cfhy
Update docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
except ImportError:
24
24
    pybaz = None
25
25
import os
26
 
from bzrlib.plugins.bzrtools import cmd_baz_import 
27
 
from bzrlib.plugins.bzrtools.baz_import import (import_version, 
28
 
                                                revision_id,
29
 
                                                make_archive,
30
 
                                                map_file_id)
 
26
try:
 
27
    from bzrtools import cmd_baz_import
 
28
    from bzrtools.baz_import import (import_version, revision_id,
 
29
                                      make_archive, map_file_id)
 
30
except ImportError:
 
31
    from bzrlib.plugins.bzrtools import cmd_baz_import 
 
32
    from bzrlib.plugins.bzrtools.baz_import import (import_version, 
 
33
                                                    revision_id,
 
34
                                                    make_archive,
 
35
                                                    map_file_id)
31
36
import shutil
32
37
from StringIO import StringIO
33
38
import tempfile
36
41
    
37
42
import bzrlib
38
43
from bzrlib.errors import NoSuchRevision
39
 
from bzrlib.plugins.bzrtools.fai import namespace_previous
 
44
try:
 
45
    from bzrtools.fai import namespace_previous
 
46
except ImportError:
 
47
    from bzrlib.plugins.bzrtools.fai import namespace_previous
40
48
from bzrlib.branch import Branch
41
49
 
42
50
def test_suite():
451
459
        self.assertEqual(entry.kind, 'symlink')
452
460
        self.assertEqual(entry.symlink_target, 'missing-file-name')
453
461
 
454
 
        # Test kind change for import
455
 
        import_version('output3', pybaz.Version(self._baz._import_symlink),
456
 
                       None)
 
462
        # current bzr doesn't handle type changes
 
463
        self.assertRaises(AssertionError, import_version, 'output3',
 
464
                          pybaz.Version(self._baz._import_symlink), None)
457
465
 
458
466
    def test_missing_ancestor(self):
459
467
        import_version('output', pybaz.Version(self._baz._missing_ancestor),