def testQueryVolnd(self): from testlib import fill_volnd self.db.reset() fill_volnd(self.db) query = dballe.Record() query["var"] = "B10004" query["datetime"] = datetime.datetime(2007, 1, 1, 0, 0, 0) reports = [] for cur in self.db.query_data(query): reports.append(cur["rep_memo"]) s = "synop" t = "temp" self.assertEqual(reports, [s, t, s, t, s, t, s, s, t, s, t])
def testQueryVolnd(self): from testlib import fill_volnd self.db.remove_all() with self.transaction() as tr: fill_volnd(tr) query = {} query["var"] = "B10004" query["datetime"] = datetime.datetime(2007, 1, 1, 0, 0, 0) reports = [] with self.deprecated_on_db(): for cur in self.db.query_data(query): reports.append(cur["rep_memo"]) s = "synop" t = "temp" self.assertEqual(reports, [s, s, s, s, s, s, t, t, t, t, t])
def setUp(self): super(CSVMixin, self).setUp() from testlib import fill_volnd with self.db.transaction() as tr: fill_volnd(tr)
def setUp(self): from testlib import fill_volnd numpy.seterr(divide="raise", over="raise", under="raise", invalid="raise") self.db = dballe.DB.connect_test() fill_volnd(self.db)
def setUp(self): from testlib import fill_volnd self.db = dballe.DB.connect_test() fill_volnd(self.db)