/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 .... import errors as bzr_errors
20
from ....tests import TestLoader
21
from ....tests.features import Feature
22
from .. import load_fastimport
0.123.12 by Jelmer Vernooij
Add FastimportFeature.
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
def test_suite():
0.123.2 by Jelmer Vernooij
Split out fastimport, import it from the system.
42
    module_names = [__name__ + '.' + x for x in [
0.64.281 by Jelmer Vernooij
Add tests for _get_source_stream.
43
        'test_commands',
0.64.282 by Jelmer Vernooij
Fix output stream to stdout for bzr fast-export.
44
        'test_exporter',
0.123.2 by Jelmer Vernooij
Split out fastimport, import it from the system.
45
        'test_branch_mapper',
46
        'test_generic_processor',
7490.78.1 by Jelmer Vernooij
Fix marks file handling on Python 3.
47
        'test_marks_file',
0.123.2 by Jelmer Vernooij
Split out fastimport, import it from the system.
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)