def test_set_database(self): # create new connection with no default db set env = copy(ENV) env.test_data_db = None con = connect_test(env) self.assertRaises(Exception, con.table, "functional_alltypes") con.set_database(self.test_data_db) con.table("functional_alltypes")
def test_set_database(self): # create new connection with no default db set env = copy(ENV) env.test_data_db = None con = connect_test(env) self.assertRaises(Exception, con.table, 'functional_alltypes') con.set_database(self.test_data_db) con.table('functional_alltypes')
def test_close_drops_temp_tables(self): from posixpath import join as pjoin hdfs_path = pjoin(self.test_data_dir, 'parquet/tpch_region') client = connect_test(ENV) table = client.parquet_file(hdfs_path) name = table.op().name assert self.con.exists_table(name) is True client.close() assert not self.con.exists_table(name)
def test_close_drops_temp_tables(self): from posixpath import join as pjoin hdfs_path = pjoin(self.test_data_dir, "parquet/tpch_region") client = connect_test(ENV) table = client.parquet_file(hdfs_path) name = table.op().name assert self.con.exists_table(name) is True client.close() assert not self.con.exists_table(name)
def test_raise_ibis_error_no_hdfs(self): # #299 client = connect_test(ENV, with_hdfs=False) self.assertRaises(com.IbisError, getattr, client, 'hdfs')
def test_raise_ibis_error_no_hdfs(self): # #299 client = connect_test(ENV, with_hdfs=False) self.assertRaises(com.IbisError, getattr, client, "hdfs")