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:
parent
5e784c060a
commit
d78a6f1699
2
setup.py
2
setup.py
|
@ -132,7 +132,7 @@ setup(
|
|||
'nose',
|
||||
'scripttest',
|
||||
'mock',
|
||||
'hypothesis<=3.28.3',
|
||||
'hypothesis',
|
||||
'flake8'
|
||||
],
|
||||
cmdclass={'test': Tox},
|
||||
|
|
|
@ -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"""
|
||||
|
|
Loading…
Reference in New Issue