Beispiel #1
0
 def testTableModifications(self):
     mocktable = self.testTables()
     table = mocktable.table
     storage = table.storage
     storage.initialize([LongColumnI("a", None, [])])
     assert storage.uptodate(table.stamp)
     storage._stamp += 1  # Not really allowed
     assert not storage.uptodate(table.stamp)
     table.cleanup()
Beispiel #2
0
 def testTablePreInitialized(self):
     f = omero.model.OriginalFileI(1, True)
     f.details.group = omero.model.ExperimenterGroupI(1, False)
     mocktable = self.testTables()
     table1 = mocktable.table
     storage = table1.storage
     storage.initialize([LongColumnI("a", None, [])])
     table2 = omero.tables.TableI(self.ctx, f, self.sf, storage)
     table2.cleanup()
     table1.cleanup()
Beispiel #3
0
 def testTablePreInitialized(self):
     f = omero.model.OriginalFileI(1, True)
     f.details.group = omero.model.ExperimenterGroupI(1, False)
     mocktable = self.testTables()
     table1 = mocktable.table
     storage = table1.storage
     storage.initialize([LongColumnI("a", None, [])])
     storage_factory = self._TestTables__tables[0]._storage_factory
     table2 = omero.tables.TableI(self.ctx, f,
                                  str(storage._HdfStorage__hdf_path),
                                  self.sf, storage_factory)
     table2.cleanup()
     table1.cleanup()
    def testTableAddData(self, newfile=True, cleanup=True):
        mocktable = self.testTables(newfile)
        table = mocktable.table
        storage = table.storage
        assert storage

        table.initialize([LongColumnI("a", None, []),
                          DoubleColumnI("b", None, [])])
        template = table.getHeaders(self.current)
        template[0].values = [1] * 5
        template[1].values = [2.0] * 5
        table.addData(template)
        if cleanup:
            table.cleanup()
        return table