summaryrefslogtreecommitdiff
path: root/tests/test_tablib.py
diff options
context:
space:
mode:
authordmosberger <davidm@egauge.net>2020-12-04 01:10:02 -0700
committerGitHub <noreply@github.com>2020-12-04 10:10:02 +0200
commite8f54811c7128d6ee849d072f27459e9b9322034 (patch)
tree273d2b67f20021d10ebaa0dcc5d611d282dbe130 /tests/test_tablib.py
parente8774043ed6496ac9664d0b4cf5bb7305f92c007 (diff)
downloadtablib-e8f54811c7128d6ee849d072f27459e9b9322034.tar.gz
Expose 'read_only' parameter for 'import_set' and 'import_book' (#483)HEADmaster
Diffstat (limited to 'tests/test_tablib.py')
-rwxr-xr-xtests/test_tablib.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_tablib.py b/tests/test_tablib.py
index b13d17c..ccb28e1 100755
--- a/tests/test_tablib.py
+++ b/tests/test_tablib.py
@@ -1040,6 +1040,13 @@ class XLSXTests(BaseTestCase):
data = tablib.Dataset().load(fh)
self.assertEqual(data.headers[0], 'Hello World')
+ def test_xlsx_bad_dimensions(self):
+ """Test loading file with bad dimension. Must be done with
+ read_only=False."""
+ xls_source = Path(__file__).parent / 'files' / 'bad_dimensions.xlsx'
+ with xls_source.open('rb') as fh:
+ data = tablib.Dataset().load(fh, read_only=False)
+ self.assertEqual(data.height, 3)
class JSONTests(BaseTestCase):
def test_json_format_detect(self):