/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
0.64.336 by Jelmer Vernooij
tests/__init__.py is GPLv2 *or later*, like the rest of bzr-fastimport.
5
# the Free Software Foundation; version 2 of the License or
6
# (at your option) any later version.
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
7
#
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.
12
#
13
# You should have received a copy of the GNU General Public License
0.64.334 by Jelmer Vernooij
Remove old FSF address. Thanks Dan Callaghan.
14
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
15
#
16
17
"""Tests for bzr-fastimport."""
18
6628.1.2 by Jelmer Vernooij
Fix imports, move exporter.py, drop explorer metadata.
19
from __future__ import absolute_import
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
20
6628.1.2 by Jelmer Vernooij
Fix imports, move exporter.py, drop explorer metadata.
21
from .... import errors as bzr_errors
22
from ....tests import TestLoader
23
from ....tests.features import Feature
24
from .. import load_fastimport
0.123.12 by Jelmer Vernooij
Add FastimportFeature.
25
26
27
class _FastimportFeature(Feature):
28
29
    def _probe(self):
30
        try:
31
            load_fastimport()
32
        except bzr_errors.DependencyNotPresent:
33
            return False
34
        return True
35
36
    def feature_name(self):
37
        return 'fastimport'
38
39
40
FastimportFeature = _FastimportFeature()
41
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
42
43
44
def test_suite():
0.123.2 by Jelmer Vernooij
Split out fastimport, import it from the system.
45
    module_names = [__name__ + '.' + x for x in [
0.64.281 by Jelmer Vernooij
Add tests for _get_source_stream.
46
        'test_commands',
0.64.282 by Jelmer Vernooij
Fix output stream to stdout for bzr fast-export.
47
        'test_exporter',
0.123.2 by Jelmer Vernooij
Split out fastimport, import it from the system.
48
        'test_branch_mapper',
49
        'test_generic_processor',
50
        'test_revision_store',
0.115.12 by John Arbash Meinel
Add a bunch of direct tests for the _TreeShim interface.
51
        ]]
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
52
    loader = TestLoader()
53
    return loader.loadTestsFromModuleNames(module_names)