summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-10-15 21:04:06 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-10-15 21:04:06 +0200
commit006a3715aa455bbece6ec9e50ae8057a6c887b6b (patch)
treecf0f854f13ca9ec5926c0eccae99e92b7e71f3ed
parente0448a113a93461136cd53adf0770bd4df7fd8a6 (diff)
downloadbzr-fastimport-006a3715aa455bbece6ec9e50ae8057a6c887b6b.tar.gz
Add FastimportFeature.
-rw-r--r--tests/__init__.py21
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():