Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 1f8e53f

Browse files
authored
Merge pull request #297 from Lukasa/fixup-tests
Fixup failing import tests
2 parents 12e67a4 + 3475cc2 commit 1f8e53f

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

hyper/ssl_compat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def inner(self, *args, **kwargs):
4848
return getattr(self._conn, method)(*args, **kwargs)
4949
return inner
5050

51+
5152
# Referenced in hyper/http20/connection.py. These values come
5253
# from the python ssl package, and must be defined in this file
5354
# for hyper to work in python versions <2.7.9

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def run_tests(self):
7878
'Programming Language :: Python :: 3.5',
7979
'Programming Language :: Python :: Implementation :: CPython',
8080
],
81-
install_requires=['h2>=2.4,<3.0', 'hyperframe>=3.2,<4.0'],
81+
install_requires=['h2>=2.4,<3.0,!=2.5.0', 'hyperframe>=3.2,<4.0'],
8282
tests_require=['pytest', 'requests', 'mock'],
8383
cmdclass={'test': PyTest},
8484
entry_points={

test/test_import.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55

66

77
class TestImportPython2(object):
8+
@pytest.mark.skipif(sys.version_info[0] == 3, reason="Python 2 only")
89
def test_cannot_import_python_2(self, monkeypatch):
910
monkeypatch.setattr(sys, 'version_info', (2, 6, 5, 'final', 0))
1011
with pytest.raises(ImportError):
1112
imp.reload(hyper)
1213

1314

1415
class TestImportPython3(object):
16+
@pytest.mark.skipif(sys.version_info[0] == 2, reason="Python 3 only")
1517
def test_cannot_import_python_32(self, monkeypatch):
1618
monkeypatch.setattr(sys, 'version_info', (3, 2, 3, 'final', 0))
1719
with pytest.raises(ImportError):

0 commit comments

Comments
 (0)