completely fix tests

The feature use_coverage of hypothesis caused the failing tests, because
the printer_file_test is sensitive to the coverage analysis of
hypothesis.

Fixed by disabling use_coverage for the crashing tests
This commit is contained in:
Patrick Kanzler 2017-09-27 10:38:42 +02:00
parent 5e784c060a
commit d78a6f1699
No known key found for this signature in database
GPG Key ID: F07F07153306FCEF
3 changed files with 5 additions and 4 deletions

View File

@ -132,7 +132,7 @@ setup(
'nose',
'scripttest',
'mock',
'hypothesis<=3.28.3',
'hypothesis',
'flake8'
],
cmdclass={'test': Tox},

View File

@ -27,6 +27,7 @@ else:
mock_open_call = '__builtin__.open'
@settings(use_coverage=False)
@given(path=text())
def test_load_file_printer(mocker, path):
"""test the loading of the file-printer"""
@ -37,7 +38,7 @@ def test_load_file_printer(mocker, path):
mock_open.assert_called_with(path, "wb")
@settings(deadline=None)
@settings(deadline=None, use_coverage=False)
@given(txt=text())
def test_auto_flush(mocker, txt):
"""test auto_flush in file-printer"""
@ -58,7 +59,7 @@ def test_auto_flush(mocker, txt):
assert mock_device.flush.called
@settings(deadline=None)
@settings(deadline=None, use_coverage=False)
@given(txt=text())
def test_flush_on_close(mocker, txt):
"""test flush on close in file-printer"""

View File

@ -10,7 +10,7 @@ deps = nose
pytest!=3.2.0
pytest-cov
pytest-mock
hypothesis<=3.28.3
hypothesis
viivakoodi
commands = py.test --cov escpos