Browse Source

add testrepository magic.

Jelmer Vernooij 15 years ago
parent
commit
1f1368eec1
3 changed files with 28 additions and 0 deletions
  1. 1 0
      .bzrignore
  2. 3 0
      .testr.conf
  3. 24 0
      dulwich/tests/__init__.py

+ 1 - 0
.bzrignore

@@ -4,3 +4,4 @@ MANIFEST
 dist
 apidocs
 *,cover
+.testrepository

+ 3 - 0
.testr.conf

@@ -0,0 +1,3 @@
+[DEFAULT]
+test_command=PYTHONPATH=. python -m subunit.run $IDLIST
+test_id_list_default=dulwich.tests.test_suite

+ 24 - 0
dulwich/tests/__init__.py

@@ -18,3 +18,27 @@
 # MA  02110-1301, USA.
 
 """Tests for Dulwich."""
+
+import unittest
+
+
+def test_suite():
+    names = [
+        'client',
+        'file',
+        'index',
+        'lru_cache',
+        'objects',
+        'object_store',
+        'pack',
+        'protocol',
+        'repository',
+        'server',
+        'web',
+        ]
+    module_names = ['dulwich.tests.test_' + name for name in names]
+    result = unittest.TestSuite()
+    loader = unittest.TestLoader()
+    suite = loader.loadTestsFromNames(module_names)
+    result.addTests(suite)
+    return result