From 70676030e95551ec3611f3f85909b354c4078d7b Mon Sep 17 00:00:00 2001 From: Andreas Madsack Date: Thu, 11 Jan 2018 20:13:40 +0100 Subject: [PATCH] very simple test to show latin-1 is readable --- byro_shackspace/tests/test_csv_file_encoding.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 byro_shackspace/tests/test_csv_file_encoding.py diff --git a/byro_shackspace/tests/test_csv_file_encoding.py b/byro_shackspace/tests/test_csv_file_encoding.py new file mode 100644 index 0000000..320393e --- /dev/null +++ b/byro_shackspace/tests/test_csv_file_encoding.py @@ -0,0 +1,7 @@ +import os.path + +def test_file_encoding(): + filename = os.path.join(os.path.dirname(__file__), 'fixtures/transactions.csv') + with open(filename, encoding='iso-8859-1') as fp: + assert len(fp.read()) == 1086 +