Beispiel #1
0
 def testAddCellsStr(self):
   if IGNORE_TEST:
     return
   single_str = "cccc ccc"
   new_list_str = ["aa", "bbb bb"]
   test_array = np.array(new_list_str)
   column = cl.Column(COLUMN_NAME)
   column.addCells(single_str)
   self.assertTrue(compareValues(column._cells, single_str))
   column = cl.Column(COLUMN_NAME)
   column.addCells(new_list_str)
   self.assertTrue(compareValues(column._cells, new_list_str))
   column = cl.Column(COLUMN_NAME)
   column.addCells(test_array)
   self.assertTrue(compareValues(column._cells, test_array))
Beispiel #2
0
 def testAddCellsStr(self):
     if IGNORE_TEST:
         return
     single_str = "cccc ccc"
     new_list_str = ["aa", "bbb bb"]
     test_array = np.array(new_list_str)
     column = cl.Column(COLUMN_NAME)
     column.addCells(single_str)
     self.assertTrue(compareValues(column._cells, single_str))
     column = cl.Column(COLUMN_NAME)
     column.addCells(new_list_str)
     self.assertTrue(compareValues(column._cells, new_list_str))
     column = cl.Column(COLUMN_NAME)
     column.addCells(test_array)
     self.assertTrue(compareValues(column._cells, test_array))
Beispiel #3
0
 def testAddCellsFloat(self):
     if IGNORE_TEST:
         return
     single_float = 1.1
     list_float = [2.0, 3.0]
     test_array = np.array(list_float)
     column = cl.Column(COLUMN_NAME)
     column.addCells(single_float)
     self.assertTrue(compareValues(column._cells, single_float))
     self.assertEqual(np.array(column._cells).dtype, np.float64)  # pylint: disable=E1101
     column = cl.Column(COLUMN_NAME)
     column.addCells(list_float)
     self.assertTrue(compareValues(column._cells, list_float))
     column = cl.Column(COLUMN_NAME)
     column.addCells(test_array)
     self.assertTrue(compareValues(column._cells, test_array))
Beispiel #4
0
 def testAddCellsFloat(self):
   if IGNORE_TEST:
     return
   single_float = 1.1
   list_float = [2.0, 3.0]
   test_array = np.array(list_float)
   column = cl.Column(COLUMN_NAME)
   column.addCells(single_float)
   self.assertTrue(compareValues(column._cells, single_float))
   self.assertEqual(np.array(column._cells).dtype,
      np.float64)  # pylint: disable=E1101
   column = cl.Column(COLUMN_NAME)
   column.addCells(list_float)
   self.assertTrue(compareValues(column._cells, list_float))
   column = cl.Column(COLUMN_NAME)
   column.addCells(test_array)
   self.assertTrue(compareValues(column._cells, test_array))
Beispiel #5
0
 def testCopy(self):
     if IGNORE_TEST:
         return
     column_copy = self.column.copy()
     self.assertEqual(self.column._name, column_copy._name)
     self.assertEqual(
         np.array(self.column._cells).dtype,
         np.array(column_copy._cells).dtype)
     self.assertTrue(compareValues(self.column._cells, column_copy._cells))
     self.assertEqual(self.column._formula_statement.getFormula(),
                      column_copy._formula_statement.getFormula())
     self.assertEqual(self.column._data_class, column_copy.getDataClass())
     self.assertEqual(self.column._asis, column_copy.getAsis())
     self.assertIsNone(column_copy._parent)
Beispiel #6
0
 def testCopy(self):
   if IGNORE_TEST:
     return
   column_copy = self.column.copy()
   self.assertEqual(self.column._name, column_copy._name)
   self.assertEqual(np.array(self.column._cells).dtype,
       np.array(column_copy._cells).dtype)
   self.assertTrue(compareValues(self.column._cells,
       column_copy._cells))
   self.assertEqual(self.column._formula_statement.getFormula(), 
       column_copy._formula_statement.getFormula())
   self.assertEqual(self.column._data_class, 
       column_copy.getDataClass())
   self.assertEqual(self.column._asis, column_copy.getAsis())
   self.assertIsNone(column_copy._parent)
Beispiel #7
0
 def testGetCells(self):
     if IGNORE_TEST:
         return
     cells = self.column.getCells()
     self.assertTrue(compareValues(self.column._cells, cells))
Beispiel #8
0
 def testGetCells(self):
   if IGNORE_TEST:
     return
   cells = self.column.getCells()
   self.assertTrue(compareValues(self.column._cells, cells))