Commit 4ff65a0a authored by Nicolas Delaby's avatar Nicolas Delaby

Test that OOoParser can handle huge spreadsheets

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29532 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a0eefb13
...@@ -951,6 +951,19 @@ class TestOOoImport(ERP5TypeTestCase): ...@@ -951,6 +951,19 @@ class TestOOoImport(ERP5TypeTestCase):
title='codification'), title='codification'),
region[6]) region[6])
def test_BigSpreadSheet_can_be_parsed(self,):
"""Test than OOoimport can parse a file with more than 40000 lines
"""
parser = OOoParser()
parser.openFile(open(makeFilePath('import_big_spreadsheet.ods'), 'rb'))
mapping = parser.getSpreadsheetsMapping()
not_ok = 1
for spread, values in mapping.iteritems():
self.assertEquals(len(values), 41001)
not_ok = 0
if not_ok:
self.fail('Spreadsheet not read!')
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestOOoImport)) suite.addTest(unittest.makeSuite(TestOOoImport))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment