diff --git a/setup.py b/setup.py index 0d92127..f76e8d2 100755 --- a/setup.py +++ b/setup.py @@ -132,7 +132,7 @@ setup( 'nose', 'scripttest', 'mock', - 'hypothesis', + 'hypothesis<=3.28.3', 'flake8' ], cmdclass={'test': Tox}, diff --git a/test/test_printer_file.py b/test/test_printer_file.py index 48b7606..b69617b 100644 --- a/test/test_printer_file.py +++ b/test/test_printer_file.py @@ -16,7 +16,7 @@ from __future__ import unicode_literals import six import pytest -from hypothesis import given +from hypothesis import given, settings from hypothesis.strategies import text import escpos.printer as printer @@ -37,6 +37,7 @@ def test_load_file_printer(mocker, path): mock_open.assert_called_with(path, "wb") +@settings(deadline=None) @given(txt=text()) def test_auto_flush(mocker, txt): """test auto_flush in file-printer""" @@ -57,6 +58,7 @@ def test_auto_flush(mocker, txt): assert mock_device.flush.called +@settings(deadline=None) @given(txt=text()) def test_flush_on_close(mocker, txt): """test flush on close in file-printer""" diff --git a/tox.ini b/tox.ini index a61a4a8..174cd85 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ deps = nose pytest!=3.2.0 pytest-cov pytest-mock - hypothesis + hypothesis<=3.28.3 viivakoodi commands = py.test --cov escpos