Exemplo n.º 1
0
 def test_sql_multiline_false(self):
     sql = db.sql("UnitTest_tmp",self.parnames, self.like, self.randompar, simulations=self.simulations_multi,
                       chains=1, save_sim=False)
     sql.save(self.like, self.randompar, self.simulations_multi)
     sql.finalize()
     sqldata = sql.getdata()
     self.assertEqual(str(type(sqldata)), "<class 'list'>")
     self.assertEqual(len(sqldata[0]), 7)
     self.assertEqual(len(sqldata), 2)
     self.assertEqual(len(sql.header), 7)
Exemplo n.º 2
0
 def test_sql_single(self):
     sql = db.sql("UnitTest_tmp",
                  self.parnames,
                  self.like,
                  self.randompar,
                  simulations=self.simulations,
                  chains=1,
                  save_sim=True)
     sql.save(self.like, self.randompar, self.simulations)
     sql.finalize()
     sqldata = sql.getdata()
     self.assertEqual(str(type(sqldata)), str(type([])))
     self.assertEqual(len(sqldata[0]), 12)
     self.assertEqual(len(sqldata), 2)
     self.assertEqual(len(sql.header), 12)