Merge branch 'development' into feature/check-barcodes

This commit is contained in:
Patrick Kanzler 2017-10-08 19:26:03 +02:00 committed by GitHub
commit 16c0a7cd61

View File

@ -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
@ -27,6 +27,7 @@ else:
mock_open_call = '__builtin__.open' mock_open_call = '__builtin__.open'
@settings(use_coverage=False)
@given(path=text()) @given(path=text())
def test_load_file_printer(mocker, path): def test_load_file_printer(mocker, path):
"""test the loading of the file-printer""" """test the loading of the file-printer"""
@ -37,6 +38,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, use_coverage=False)
@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 +59,7 @@ def test_auto_flush(mocker, txt):
assert mock_device.flush.called assert mock_device.flush.called
@settings(deadline=None, use_coverage=False)
@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"""