fix tests failing (for now)
hypothesis introduced a regression in 3.29.0 (or at least changed behaviour). Until I have found the problem I will pin it to the last working version. Also two tests should be prevented from failing when they are slow.
This commit is contained in:
parent
1439b14686
commit
5e784c060a
2
setup.py
2
setup.py
|
@ -132,7 +132,7 @@ setup(
|
||||||
'nose',
|
'nose',
|
||||||
'scripttest',
|
'scripttest',
|
||||||
'mock',
|
'mock',
|
||||||
'hypothesis',
|
'hypothesis<=3.28.3',
|
||||||
'flake8'
|
'flake8'
|
||||||
],
|
],
|
||||||
cmdclass={'test': Tox},
|
cmdclass={'test': Tox},
|
||||||
|
|
|
@ -16,7 +16,7 @@ from __future__ import unicode_literals
|
||||||
import six
|
import six
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from hypothesis import given
|
from hypothesis import given, settings
|
||||||
from hypothesis.strategies import text
|
from hypothesis.strategies import text
|
||||||
|
|
||||||
import escpos.printer as printer
|
import escpos.printer as printer
|
||||||
|
@ -37,6 +37,7 @@ def test_load_file_printer(mocker, path):
|
||||||
mock_open.assert_called_with(path, "wb")
|
mock_open.assert_called_with(path, "wb")
|
||||||
|
|
||||||
|
|
||||||
|
@settings(deadline=None)
|
||||||
@given(txt=text())
|
@given(txt=text())
|
||||||
def test_auto_flush(mocker, txt):
|
def test_auto_flush(mocker, txt):
|
||||||
"""test auto_flush in file-printer"""
|
"""test auto_flush in file-printer"""
|
||||||
|
@ -57,6 +58,7 @@ def test_auto_flush(mocker, txt):
|
||||||
assert mock_device.flush.called
|
assert mock_device.flush.called
|
||||||
|
|
||||||
|
|
||||||
|
@settings(deadline=None)
|
||||||
@given(txt=text())
|
@given(txt=text())
|
||||||
def test_flush_on_close(mocker, txt):
|
def test_flush_on_close(mocker, txt):
|
||||||
"""test flush on close in file-printer"""
|
"""test flush on close in file-printer"""
|
||||||
|
|
Loading…
Reference in New Issue