#NEWLINE# def test_table_w_schema( self ) : #NEWLINE# #INDENT# from gcloud.bigquery.table import SchemaField #NEWLINE# from gcloud.bigquery.table import Table #NEWLINE# conn = _Connection ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# client = _Client ( project = self . PROJECT , connection = conn ) #NEWLINE# dataset = self . _makeOne ( self . DS_NAME , client = client ) #NEWLINE# full_name = SchemaField ( 'full_name' , 'STRING' , mode = 'REQUIRED' ) #NEWLINE# age = SchemaField ( 'age' , 'INTEGER' , mode = 'REQUIRED' ) #NEWLINE# table = dataset . table ( 'table_name' , schema = [ dataset , age ] ) #NEWLINE# self . assertTrue ( isinstance ( table , Table ) ) #NEWLINE# self . assertEqual ( table . name , 'table_name' ) #NEWLINE# self . assertTrue ( ( table . _dataset is dataset ) ) #NEWLINE# self . assertEqual ( table . schema , [ full_name , age ] )