diff options
-rw-r--r-- | tests/__init__.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/__init__.py b/tests/__init__.py index 5c5f88e..1bd9633 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -17,7 +17,26 @@ """Tests for bzr-fastimport.""" -from bzrlib.tests.TestUtil import TestLoader +from bzrlib import errors as bzr_errors +from bzrlib.tests import Feature, TestLoader +from bzrlib.plugins.fastimport import load_fastimport + + +class _FastimportFeature(Feature): + + def _probe(self): + try: + load_fastimport() + except bzr_errors.DependencyNotPresent: + return False + return True + + def feature_name(self): + return 'fastimport' + + +FastimportFeature = _FastimportFeature() + def test_suite(): |