Ejemplo n.º 1
0
    def test_SqliteFlatDb(self):
        """ Create a SqliteDataset """
        from pyworkflow.mapper.sqlite import SqliteFlatDb

        print ">>> test_SqliteFlatDb: dbName = '%s'" % self.modelGoldSqlite
        db = SqliteFlatDb(self.modelGoldSqlite)
        # Test the 'self' class name is correctly retrieved
        self.assertEqual("Micrograph", db.getSelfClassName())
        # Check the count is equal to 3
        self.assertEqual(3, db.count())
        db.close()
Ejemplo n.º 2
0
 def test_SqliteFlatDb(self):
     """ Create a SqliteDataset """
     from pyworkflow.mapper.sqlite import SqliteFlatDb
     print ">>> test_SqliteFlatDb: dbName = '%s'" % self.modelGoldSqlite
     db = SqliteFlatDb(self.modelGoldSqlite)
     # Old db version 0
     self.assertEqual(0, db.getVersion())
     # Test the 'self' class name is correctly retrieved
     self.assertEqual('Micrograph', db.getSelfClassName())
     # Check the count is equal to 3
     self.assertEqual(3, db.count())
     db.close()