Remove unused imports, limit import of nose to one file (so it's easier to
authorJelmer Vernooij <jelmer@samba.org>
Sun, 7 Mar 2010 16:44:26 +0000 (17:44 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 7 Mar 2010 16:44:26 +0000 (17:44 +0100)
replace the SkipTest class with e.g. the one from testtools).

dulwich/tests/compat/test_pack.py
dulwich/tests/compat/test_server.py
dulwich/tests/compat/test_web.py
dulwich/tests/compat/utils.py

index f8cd76b3e68977c4086b3ba7dee3581b9389ea34..52c66c5c863e9f540b47f778d509b9f865c2e85c 100644 (file)
@@ -26,7 +26,6 @@ import shutil
 import tempfile
 
 from dulwich.pack import (
-    Pack,
     write_pack,
     )
 from dulwich.tests.test_pack import (
index 32afa16ee7f710eb57e85e3a9c0c3c275b9ade57..a9088854e48a6309e04bdf222c69d2e9545f7b54 100644 (file)
@@ -25,9 +25,6 @@ On *nix, you can kill the tests with Ctrl-Z, "kill %".
 """
 
 import threading
-import unittest
-
-import nose
 
 from dulwich import server
 from server_utils import (
@@ -36,6 +33,7 @@ from server_utils import (
     )
 from utils import (
     CompatTestCase,
+    SkipTest,
     )
 
 
@@ -74,4 +72,4 @@ class GitServerTestCase(ServerTests, CompatTestCase):
         return port
 
     def test_push_to_dulwich(self):
-        raise nose.SkipTest('Skipping push test due to known deadlock bug.')
+        raise SkipTest('Skipping push test due to known deadlock bug.')
index 0ce2ce7618a8c7cd682cd89513a04409801e9fb6..c30b40045e715a3ca00c0408811baf1c4ea96e19 100644 (file)
@@ -24,16 +24,9 @@ tests, deadlocks may freeze the test process such that it cannot be Ctrl-C'ed.
 On *nix, you can kill the tests with Ctrl-Z, "kill %".
 """
 
-import sys
 import threading
-import unittest
 from wsgiref import simple_server
 
-import nose
-
-from dulwich.repo import (
-    Repo,
-    )
 from dulwich.server import (
     GitBackend,
     )
@@ -41,16 +34,13 @@ from dulwich.web import (
     HTTPGitApplication,
     )
 
-from dulwich.tests.utils import (
-    open_repo,
-    tear_down_repo,
-    )
 from server_utils import (
     ServerTests,
     ShutdownServerMixIn,
     )
 from utils import (
     CompatTestCase,
+    SkipTest,
     )
 
 
@@ -105,7 +95,7 @@ class SmartWebTestCase(WebTests, CompatTestCase):
 
     def test_push_to_dulwich(self):
         # TODO(dborowitz): enable after merging thin pack fixes.
-        raise nose.SkipTest('Skipping push test due to known pack bug.')
+        raise SkipTest('Skipping push test due to known pack bug.')
 
 
 class DumbWebTestCase(WebTests, CompatTestCase):
@@ -124,4 +114,4 @@ class DumbWebTestCase(WebTests, CompatTestCase):
 
     def test_push_to_dulwich(self):
         # Note: remove this if dumb pushing is supported
-        raise nose.SkipTest('Dumb web pushing not supported.')
+        raise SkipTest('Dumb web pushing not supported.')
index d192793a62e8f451a0dedf1ef467a69f925811a7..baf4ec0fd095c824198e4cc6cfd2b7aec3b6d80a 100644 (file)
@@ -24,10 +24,10 @@ import subprocess
 import tempfile
 import unittest
 
-import nose
+# XXX: Ideally we shouldn't depend on nose but allow other testrunners as well.
+from nose import SkipTest
 
 from dulwich.repo import Repo
-from dulwich.tests.utils import open_repo
 
 
 _DEFAULT_GIT = 'git'
@@ -67,7 +67,7 @@ def require_git_version(required_version, git_path=_DEFAULT_GIT):
     if found_version < required_version:
         required_version = '.'.join(map(str, required_version))
         found_version = '.'.join(map(str, found_version))
-        raise nose.SkipTest('Test requires git >= %s, found %s' %
+        raise SkipTest('Test requires git >= %s, found %s' %
                             (required_version, found_version))