Bladeren bron

Merge branch 'appveyor' of git://github.com/garyvdm/dulwich

Jelmer Vernooij 10 jaren geleden
bovenliggende
commit
deb9183f8b
4 gewijzigde bestanden met toevoegingen van 40 en 10 verwijderingen
  1. 14 0
      appveyor.yml
  2. 4 1
      dulwich/tests/compat/test_server.py
  3. 6 0
      dulwich/tests/compat/test_web.py
  4. 16 9
      setup.py

+ 14 - 0
appveyor.yml

@@ -0,0 +1,14 @@
+environment:
+  matrix:
+    - PYTHON: "C:\\Python27"
+      PYTHON_ARCH: "32"
+
+    - PYTHON: "C:\\Python34"
+      PYTHON_ARCH: "32"
+
+build: off
+
+test_script:
+  - "%WITH_COMPILER% %PYTHON%/python setup.py test"
+
+

+ 4 - 1
dulwich/tests/compat/test_server.py

@@ -26,11 +26,13 @@ Warning: these tests should be fairly stable, but when writing/debugging new
 
 import threading
 import os
+import sys
 
 from dulwich.server import (
     DictBackend,
     TCPGitServer,
     )
+from dulwich.tests import skipIf
 from dulwich.tests.compat.server_utils import (
     ServerTests,
     NoSideBand64kReceivePackHandler,
@@ -40,7 +42,7 @@ from dulwich.tests.compat.utils import (
     require_git_version,
     )
 
-
+@skipIf(sys.platform == 'win32', 'Broken on windows, with very long fail time.')
 class GitServerTestCase(ServerTests, CompatTestCase):
     """Tests for client/server compatibility.
 
@@ -70,6 +72,7 @@ class GitServerTestCase(ServerTests, CompatTestCase):
         return port
 
 
+@skipIf(sys.platform == 'win32', 'Broken on windows, with very long fail time.')
 class GitServerSideBand64kTestCase(GitServerTestCase):
     """Tests for client/server compatibility with side-band-64k support."""
 

+ 6 - 0
dulwich/tests/compat/test_web.py

@@ -26,12 +26,14 @@ warning: these tests should be fairly stable, but when writing/debugging new
 
 import threading
 from wsgiref import simple_server
+import sys
 
 from dulwich.server import (
     DictBackend,
     )
 from dulwich.tests import (
     SkipTest,
+    skipIf,
     )
 from dulwich.web import (
     make_wsgi_chain,
@@ -49,6 +51,7 @@ from dulwich.tests.compat.utils import (
     )
 
 
+@skipIf(sys.platform == 'win32', 'Broken on windows, with very long fail time.')
 class WebTests(ServerTests):
     """Base tests for web server tests.
 
@@ -72,6 +75,7 @@ class WebTests(ServerTests):
         return port
 
 
+@skipIf(sys.platform == 'win32', 'Broken on windows, with very long fail time.')
 class SmartWebTestCase(WebTests, CompatTestCase):
     """Test cases for smart HTTP server.
 
@@ -98,6 +102,7 @@ class SmartWebTestCase(WebTests, CompatTestCase):
         return app
 
 
+@skipIf(sys.platform == 'win32', 'Broken on windows, with very long fail time.')
 class SmartWebSideBand64kTestCase(SmartWebTestCase):
     """Test cases for smart HTTP server with side-band-64k support."""
 
@@ -113,6 +118,7 @@ class SmartWebSideBand64kTestCase(SmartWebTestCase):
         self.assertTrue('side-band-64k' in caps)
 
 
+@skipIf(sys.platform == 'win32', 'Broken on windows, with very long fail time.')
 class DumbWebTestCase(WebTests, CompatTestCase):
     """Test cases for dumb HTTP server."""
 

+ 16 - 9
setup.py

@@ -48,7 +48,7 @@ if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
 
 if sys.version_info[0] == 2:
     tests_require = ['fastimport', 'mock']
-    if not '__pypy__' in sys.modules:
+    if not '__pypy__' in sys.modules and not sys.platform == 'win32':
         tests_require.extend(['gevent', 'geventhttpclient'])
 else:
     # fastimport, gevent, geventhttpclient are not available for PY3
@@ -57,6 +57,20 @@ else:
 if sys.version_info < (2, 7):
     tests_require.append('unittest2')
 
+if sys.version_info[0] > 2 and sys.platform == 'win32':
+    # C Modules don't build for python3 windows, and prevent tests from running
+    ext_modules = []
+else:
+    ext_modules = [
+        Extension('dulwich._objects', ['dulwich/_objects.c'],
+                  include_dirs=include_dirs),
+        Extension('dulwich._pack', ['dulwich/_pack.c'],
+                  include_dirs=include_dirs),
+        Extension('dulwich._diff_tree', ['dulwich/_diff_tree.c'],
+                  include_dirs=include_dirs),
+    ]
+
+
 setup(name='dulwich',
       description='Python Git Library',
       keywords='git',
@@ -86,14 +100,7 @@ setup(name='dulwich',
           'Operating System :: POSIX',
           'Topic :: Software Development :: Version Control',
       ],
-      ext_modules=[
-          Extension('dulwich._objects', ['dulwich/_objects.c'],
-                    include_dirs=include_dirs),
-          Extension('dulwich._pack', ['dulwich/_pack.c'],
-              include_dirs=include_dirs),
-          Extension('dulwich._diff_tree', ['dulwich/_diff_tree.c'],
-              include_dirs=include_dirs),
-      ],
+      ext_modules=ext_modules,
       test_suite='dulwich.tests.test_suite',
       tests_require=tests_require,
       distclass=DulwichDistribution,