From 7236415f420befb51261090d2d18cc2b1f23a7f2 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 23 Feb 2012 06:20:57 -0500 Subject: [PATCH 1/8] travis --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..82a9a9f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: python +python: + - 2.6 + - 2.7 + - 3.2 +install: python setup.py install +script: python test_tablib.py From 783eccc67dbf219a99973e045a12686674ffd568 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 23 Feb 2012 06:31:50 -0500 Subject: [PATCH 2/8] skip install --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 82a9a9f..762df2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,5 +3,4 @@ python: - 2.6 - 2.7 - 3.2 -install: python setup.py install script: python test_tablib.py From 26748deb9f84963580ef9f0054b72b29b157ed77 Mon Sep 17 00:00:00 2001 From: James Patrick Robinson Jr Date: Tue, 27 Aug 2013 11:57:43 -0400 Subject: [PATCH 3/8] changed split('\r\n') to splitlines() --- tablib/formats/_tsv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tablib/formats/_tsv.py b/tablib/formats/_tsv.py index 816b6e3..8ef2b67 100644 --- a/tablib/formats/_tsv.py +++ b/tablib/formats/_tsv.py @@ -34,9 +34,9 @@ def import_set(dset, in_stream, headers=True): dset.wipe() if is_py3: - rows = csv.reader(in_stream.split('\r\n'), delimiter='\t') + rows = csv.reader(in_stream.splitlines(), delimiter='\t') else: - rows = csv.reader(in_stream.split('\r\n'), delimiter='\t', + rows = csv.reader(in_stream.splitlines(), delimiter='\t', encoding=DEFAULT_ENCODING) for i, row in enumerate(rows): From 02c38c2520842806efdbcf2d9d3bb734ef240ed2 Mon Sep 17 00:00:00 2001 From: James Patrick Robinson Jr Date: Tue, 27 Aug 2013 17:14:25 -0400 Subject: [PATCH 4/8] edited travis to match master --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 82a9a9f..762df2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,5 +3,4 @@ python: - 2.6 - 2.7 - 3.2 -install: python setup.py install script: python test_tablib.py From 85e2bd73fcdfe4090d6686a214be27456ac65be4 Mon Sep 17 00:00:00 2001 From: James Patrick Robinson Jr Date: Tue, 27 Aug 2013 17:34:06 -0400 Subject: [PATCH 5/8] put the install back in --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 762df2d..b45810f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,4 +3,6 @@ python: - 2.6 - 2.7 - 3.2 +install: + - python setup.py install script: python test_tablib.py From 7545f3726e49206ad66099315e520ce584796950 Mon Sep 17 00:00:00 2001 From: James Patrick Robinson Jr Date: Wed, 28 Aug 2013 09:45:30 -0400 Subject: [PATCH 6/8] changed import to reflect vendorized openpyxl --- test_tablib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_tablib.py b/test_tablib.py index b9464b4..4ef13cb 100755 --- a/test_tablib.py +++ b/test_tablib.py @@ -5,7 +5,7 @@ import unittest import sys -import openpyxl +from tablib.packages import openpyxl import os import tablib from tablib.compat import markup, unicode From d8f0a018ae752bb1d2b7fba2d803ab29ed19a43a Mon Sep 17 00:00:00 2001 From: James Patrick Robinson Jr Date: Wed, 28 Aug 2013 11:24:56 -0400 Subject: [PATCH 7/8] safe_load is not working for book yaml.safe_load() was not working for import_book, changed it to use yaml.load() instead. --- tablib/formats/_yaml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tablib/formats/_yaml.py b/tablib/formats/_yaml.py index 91a3baa..e2ccf46 100644 --- a/tablib/formats/_yaml.py +++ b/tablib/formats/_yaml.py @@ -46,7 +46,7 @@ def import_book(dbook, in_stream): dbook.wipe() - for sheet in yaml.safe_load(in_stream): + for sheet in yaml.load(in_stream): data = tablib.Dataset() data.title = sheet['title'] data.dict = sheet['data'] From 9e45b95d1238fa530ee7b26a7f0acb6443c10907 Mon Sep 17 00:00:00 2001 From: James Patrick Robinson Jr Date: Wed, 28 Aug 2013 11:40:37 -0400 Subject: [PATCH 8/8] Removed import of openpyxl all together It's not needed for any of these tests, but if it were we would need to check for the python version to import the right one. --- test_tablib.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test_tablib.py b/test_tablib.py index 4ef13cb..a53612d 100755 --- a/test_tablib.py +++ b/test_tablib.py @@ -5,7 +5,6 @@ import unittest import sys -from tablib.packages import openpyxl import os import tablib from tablib.compat import markup, unicode