The get_ancestry() method was removed from bzr sometime in the past.
[bzr-fastimport.git] / tests / __init__.py
blobe166fb252182ff05486f559cb207159bacb10d4b
1 # Copyright (C) 2008 Canonical Limited.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; version 2 of the License or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 """Tests for bzr-fastimport."""
20 from bzrlib import errors as bzr_errors
21 from bzrlib.tests import TestLoader
22 try:
23 from bzrlib.tests.features import Feature
24 except ImportError: # bzr < 2.5
25 from bzrlib.tests import Feature
26 from bzrlib.plugins.fastimport import load_fastimport
29 class _FastimportFeature(Feature):
31 def _probe(self):
32 try:
33 load_fastimport()
34 except bzr_errors.DependencyNotPresent:
35 return False
36 return True
38 def feature_name(self):
39 return 'fastimport'
42 FastimportFeature = _FastimportFeature()
46 def test_suite():
47 module_names = [__name__ + '.' + x for x in [
48 'test_commands',
49 'test_exporter',
50 'test_branch_mapper',
51 'test_generic_processor',
52 'test_revision_store',
54 loader = TestLoader()
55 return loader.loadTestsFromModuleNames(module_names)