def test_del_table_method(self): sqldf = SQLDF(locals()) cursor = sqldf.conn.cursor() # create table cursor.execute("create table deltbl(col);") sqldf._del_table(["deltbl"]) self.assertEqual( list( cursor.execute( "select * from sqlite_master where type='table';")), [])
def test_del_table_method(self): sqldf = SQLDF(locals()) cursor = sqldf.conn.cursor() # create table cursor.execute("create table deltbl(col);") sqldf._del_table(["deltbl"]) self.assertEqual( list( cursor.execute("select * from sqlite_master where type='table';")), [])
def test_del_table_method_not_exist_table(self): sqldf = SQLDF(locals()) self.assertRaises( sqlite3.OperationalError, lambda: sqldf._del_table( ["deltblaaaaaaa"]))
def test_del_table_method_not_exist_table(self): sqldf = SQLDF(locals()) self.assertRaises(sqlite3.OperationalError, lambda: sqldf._del_table(["deltblaaaaaaa"]))