From 3681c5c7bfcaff98adf388e84cc1cdab1923c054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Elsd=C3=B6rfer?= Date: Tue, 30 Aug 2016 13:20:42 +0200 Subject: [PATCH] Fix tests for Python 3. --- test/test_function_barcode.py | 2 +- test/test_function_text.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_function_barcode.py b/test/test_function_barcode.py index 4205eba..c6ec958 100644 --- a/test/test_function_barcode.py +++ b/test/test_function_barcode.py @@ -31,4 +31,4 @@ def test_lacks_support(bctype, supports_b): with pytest.raises(BarcodeTypeError): instance.barcode('test', bctype) - assert instance.output == '' \ No newline at end of file + assert instance.output == b'' \ No newline at end of file diff --git a/test/test_function_text.py b/test/test_function_text.py index dc25842..7f91c95 100644 --- a/test/test_function_text.py +++ b/test/test_function_text.py @@ -19,7 +19,7 @@ def test_function_text_dies_ist_ein_test_lf(): """test the text printing function with simple string and compare output""" instance = Dummy() instance.text('Dies ist ein Test.\n') - assert instance.output == 'Dies ist ein Test.\n' + assert instance.output == b'Dies ist ein Test.\n' def test_block_text(): @@ -27,4 +27,4 @@ def test_block_text(): printer.block_text( "All the presidents men were eating falafel for breakfast.", font='a') assert printer.output == \ - 'All the presidents men were eating falafel\nfor breakfast.' + b'All the presidents men were eating falafel\nfor breakfast.'