[Erp5-report] r29532 - in /erp5/trunk/products/ERP5OOo/tests: ./ test_document/

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 9 15:53:50 CEST 2009


Author: nicolas
Date: Fri Oct  9 15:53:47 2009
New Revision: 29532

URL: http://svn.erp5.org?rev=29532&view=rev
Log:
Test that OOoParser can handle huge spreadsheets

Added:
    erp5/trunk/products/ERP5OOo/tests/test_document/import_big_spreadsheet.ods   (with props)
Modified:
    erp5/trunk/products/ERP5OOo/tests/testOOoImport.py

Modified: erp5/trunk/products/ERP5OOo/tests/testOOoImport.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/testOOoImport.py?rev=29532&r1=29531&r2=29532&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testOOoImport.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/tests/testOOoImport.py [utf8] Fri Oct  9 15:53:47 2009
@@ -951,6 +951,19 @@
                            title='codification'),
                       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():
   suite = unittest.TestSuite()
   suite.addTest(unittest.makeSuite(TestOOoImport))

Added: erp5/trunk/products/ERP5OOo/tests/test_document/import_big_spreadsheet.ods
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/test_document/import_big_spreadsheet.ods?rev=29532&view=auto
==============================================================================
Binary file - no diff available.

Propchange: erp5/trunk/products/ERP5OOo/tests/test_document/import_big_spreadsheet.ods
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream




More information about the Erp5-report mailing list