123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- diff --git a/dulwich/tests/compat/test_client.py b/dulwich/tests/compat/test_client.py
- index f7c3930e..39e6d97c 100644
- --- a/dulwich/tests/compat/test_client.py
- +++ b/dulwich/tests/compat/test_client.py
- @@ -531,6 +531,8 @@ class DulwichHttpClientTest(CompatTestCase, DulwichClientTestBase):
- min_git_version = (1, 7, 0, 2)
-
- def setUp(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- CompatTestCase.setUp(self)
- DulwichClientTestBase.setUp(self)
- self._httpd = HTTPGitServer(("localhost", 0), self.gitroot)
- diff --git a/dulwich/tests/test_client.py b/dulwich/tests/test_client.py
- index 7d2c464b..01030f70 100644
- --- a/dulwich/tests/test_client.py
- +++ b/dulwich/tests/test_client.py
- @@ -35,7 +35,8 @@ try:
- except ImportError:
- import urllib.parse as urlparse
-
- -import urllib3
- +if '__pypy__' not in sys.modules:
- + import urllib3
-
- import dulwich
- from dulwich import (
- @@ -534,12 +535,20 @@ class TestGetTransportAndPath(TestCase):
- self.assertTrue(isinstance(c, SSHGitClient))
-
- def test_http(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- +
- url = 'https://github.com/jelmer/dulwich'
- c, path = get_transport_and_path(url)
- self.assertTrue(isinstance(c, HttpGitClient))
- self.assertEqual('/jelmer/dulwich', path)
-
- def test_http_auth(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- +
- url = 'https://user:passwd@github.com/jelmer/dulwich'
-
- c, path = get_transport_and_path(url)
- @@ -550,6 +559,10 @@ class TestGetTransportAndPath(TestCase):
- self.assertEqual('passwd', c._password)
-
- def test_http_no_auth(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- +
- url = 'https://github.com/jelmer/dulwich'
-
- c, path = get_transport_and_path(url)
- @@ -632,6 +645,9 @@ class TestGetTransportAndPathFromUrl(TestCase):
- 'prospero://bar/baz')
-
- def test_http(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- url = 'https://github.com/jelmer/dulwich'
- c, path = get_transport_and_path_from_url(url)
- self.assertTrue(isinstance(c, HttpGitClient))
- @@ -863,6 +879,11 @@ class LocalGitClientTests(TestCase):
-
- class HttpGitClientTests(TestCase):
-
- + def setUp(self):
- + super(HttpGitClientTests, self).setUp()
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- @staticmethod
- def b64encode(s):
- """Python 2/3 compatible Base64 encoder. Returns string."""
- @@ -961,12 +982,18 @@ class TCPGitClientTests(TestCase):
-
- class DefaultUrllib3ManagerTest(TestCase):
-
- + def setUp(self):
- + super(DefaultUrllib3ManagerTest, self).setUp()
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- def test_no_config(self):
- manager = default_urllib3_manager(config=None)
- self.assertEqual(manager.connection_pool_kw['cert_reqs'],
- 'CERT_REQUIRED')
-
- def test_config_no_proxy(self):
- +
- manager = default_urllib3_manager(config=ConfigDict())
- self.assertNotIsInstance(manager, urllib3.ProxyManager)
-
|