Skip hypothesis tests on 3.2

(It's not 3.2 compatible at the moment).
This commit is contained in:
Robert Collins 2015-10-20 15:11:05 +13:00
parent 45bd8ebb6b
commit 22ef32a2cd
2 changed files with 17 additions and 11 deletions

View File

@ -17,11 +17,15 @@
from io import BytesIO
import datetime
try:
from hypothesis import given
# To debug hypothesis
# from hypothesis import Settings, Verbosity
# Settings.default.verbosity = Verbosity.verbose
import hypothesis.strategies as st
except ImportError:
given = None
st = None
from testtools import TestCase
from testtools.matchers import Contains, HasLength
from testtools.tests.test_testresult import TestStreamResultContract
@ -440,6 +444,7 @@ class TestByteStreamToStreamResult(TestCase):
self.check_event(content.getvalue(), test_id=None, file_name='bar',
route_code='0', mime_type='text/plain', file_bytes=b'foo')
if st is not None:
@given(st.binary())
def test_hypothesis_decoding(self, code_bytes):
source = BytesIO(code_bytes)

View File

@ -20,7 +20,8 @@ else:
],
'extras_require': {
'docs': ['docutils'],
'test': ['fixtures', 'hypothesis', 'testscenarios'],
'test': ['fixtures', 'testscenarios'],
'test:python_version!="3.2"': ['hypothesis'],
},
}