/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
1
# Copyright (C) 2008 Canonical Limited.
2
#
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.
6
#
7
# This program is distributed in the hope that it will be useful,
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
# GNU General Public License for more details.
11
#
12
# You should have received a copy of the GNU General Public License
13
# along with this program; if not, write to the Free Software
14
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
15
#
16
17
"""Tests for bzr-fastimport."""
18
19
0.123.12 by Jelmer Vernooij
Add FastimportFeature.
20
from bzrlib import errors as bzr_errors
21
from bzrlib.tests import Feature, TestLoader
22
from bzrlib.plugins.fastimport import load_fastimport
23
24
25
class _FastimportFeature(Feature):
26
27
    def _probe(self):
28
        try:
29
            load_fastimport()
30
        except bzr_errors.DependencyNotPresent:
31
            return False
32
        return True
33
34
    def feature_name(self):
35
        return 'fastimport'
36
37
38
FastimportFeature = _FastimportFeature()
39
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
40
41
42
def test_suite():
0.123.2 by Jelmer Vernooij
Split out fastimport, import it from the system.
43
    module_names = [__name__ + '.' + x for x in [
0.64.281 by Jelmer Vernooij
Add tests for _get_source_stream.
44
        'test_commands',
0.64.282 by Jelmer Vernooij
Fix output stream to stdout for bzr fast-export.
45
        'test_exporter',
0.123.2 by Jelmer Vernooij
Split out fastimport, import it from the system.
46
        'test_branch_mapper',
47
        'test_generic_processor',
48
        'test_revision_store',
0.115.12 by John Arbash Meinel
Add a bunch of direct tests for the _TreeShim interface.
49
        ]]
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
50
    loader = TestLoader()
51
    return loader.loadTestsFromModuleNames(module_names)