Ejemplo n.º 1
0
 def _testExportTable(self, columns=None, worksheet=None):
     exportTableToExcel(self.api,
                        TEST_FILE,
                        worksheet=worksheet,
                        columns=columns)
     if columns is None:
         columns = self.columns
     if worksheet is None:
         expected_worksheet = 'Sheet1'
     self._compareExportedDataframe(worksheet, columns)
 def _testExportTable(self, columns=None, worksheet=None):
   exportTableToExcel(self.api, 
                      TEST_FILE, 
                      worksheet=worksheet, 
                      columns=columns)
   if columns is None:
     columns = self.columns
   if worksheet is None:
     expected_worksheet = 'Sheet1'
   self._compareExportedDataframe(worksheet, columns)
 def testBadPath(self):
   return
   b = False
   error = None
   try:
     df = pd.DataFrame()
     exportTableToExcel(self.api, "this/badpath.csv", df)
   except Exception as e:
     error = e
     import pdb; pdb.set_trace()
     b = isinstance(e, IOError) or isinstance(e, ValueError)
   self.assertTrue(b)
Ejemplo n.º 4
0
 def testBadPath(self):
     return
     b = False
     error = None
     try:
         df = pd.DataFrame()
         exportTableToExcel(self.api, "this/badpath.csv", df)
     except Exception as e:
         error = e
         import pdb
         pdb.set_trace()
         b = isinstance(e, IOError) or isinstance(e, ValueError)
     self.assertTrue(b)
Ejemplo n.º 5
0
 def testBadColumn(self):
     with self.assertRaises(ValueError):
         exportTableToExcel(self.api, TEST_FILE, self.df, ['w'])
 def testBadColumn(self):
   with self.assertRaises(ValueError):
     exportTableToExcel(self.api, TEST_FILE, self.df, ['w'])