~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/features.py

  • Committer: Ian Clatworthy
  • Date: 2009-09-09 00:49:50 UTC
  • mto: (4634.37.2 prepare-2.0)
  • mto: This revision was merged to the branch mainline in revision 4689.
  • Revision ID: ian.clatworthy@canonical.com-20090909004950-43z4zdicb5u91iet
tweak quick reference naming to make it consistent with other PDFs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2009 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
 
from bzrlib import tests
19
 
from bzrlib.symbol_versioning import deprecated_in
20
 
 
21
 
 
22
 
apport = tests.ModuleAvailableFeature('apport')
23
 
paramiko = tests.ModuleAvailableFeature('paramiko')
24
 
pycurl = tests.ModuleAvailableFeature('pycurl')
25
 
subunit = tests.ModuleAvailableFeature('subunit')
 
18
from bzrlib.tests import Feature
 
19
 
 
20
 
 
21
class _ApportFeature(Feature):
 
22
    
 
23
    def _probe(self):
 
24
        try:
 
25
            import apport
 
26
        except ImportError, e:
 
27
            return False
 
28
        else:
 
29
            return True
 
30
 
 
31
    def feature_name(self):
 
32
        return 'apport'
 
33
 
 
34
 
 
35
ApportFeature = _ApportFeature()