@@ -64,30 +64,17 @@ def test_schema_from_data(self):
6464
6565 with self .assertRaises (Exception ) as error1 :
6666 _ = datalab .bigquery .Schema .from_data (variant1 )
67- if sys .version_info [0 ] == 3 :
68- self .assertEquals ('Cannot create a schema from heterogeneous list [3, 2.0, True, ' +
69- '[\' cow\' , \' horse\' , [0, []]]]; perhaps you meant to use ' +
70- 'Schema.from_record?' , str (error1 .exception ))
71- else :
72- self .assertEquals ('Cannot create a schema from heterogeneous list [3, 2.0, True, ' +
73- '[u\' cow\' , u\' horse\' , [0, []]]]; perhaps you meant to use ' +
74- 'Schema.from_record?' , str (error1 .exception ))
67+ self .assertEquals ('Cannot create a schema from heterogeneous list [3, 2.0, True, ' +
68+ '[\' cow\' , \' horse\' , [0, []]]]; perhaps you meant to use ' +
69+ 'Schema.from_record?' , str (error1 .exception ))
7570 with self .assertRaises (Exception ) as error2 :
7671 _ = datalab .bigquery .Schema .from_data (variant2 )
77- if sys .version_info [0 ] == 3 :
78- self .assertEquals ('Cannot create a schema from dict OrderedDict([(\' Column1\' , 3), ' +
79- '(\' Column2\' , 2.0), (\' Column3\' , True), (\' Column4\' , ' +
80- 'OrderedDict([(\' Column1\' , \' cow\' ), (\' Column2\' , \' horse\' ), ' +
81- '(\' Column3\' , OrderedDict([(\' Column1\' , 0), (\' Column2\' , ' +
82- 'OrderedDict())]))]))]); perhaps you meant to use Schema.from_record?' ,
83- str (error2 .exception ))
84- else :
85- self .assertEquals ('Cannot create a schema from dict OrderedDict([(u\' Column1\' , 3), ' +
86- '(u\' Column2\' , 2.0), (u\' Column3\' , True), (u\' Column4\' , ' +
87- 'OrderedDict([(u\' Column1\' , u\' cow\' ), (u\' Column2\' , u\' horse\' ), ' +
88- '(u\' Column3\' , OrderedDict([(u\' Column1\' , 0), (u\' Column2\' , ' +
89- 'OrderedDict())]))]))]); perhaps you meant to use Schema.from_record?' ,
90- str (error2 .exception ))
72+ self .assertEquals ('Cannot create a schema from dict OrderedDict([(\' Column1\' , 3), ' +
73+ '(\' Column2\' , 2.0), (\' Column3\' , True), (\' Column4\' , ' +
74+ 'OrderedDict([(\' Column1\' , \' cow\' ), (\' Column2\' , \' horse\' ), ' +
75+ '(\' Column3\' , OrderedDict([(\' Column1\' , 0), (\' Column2\' , ' +
76+ 'OrderedDict())]))]))]); perhaps you meant to use Schema.from_record?' ,
77+ str (error2 .exception ))
9178 schema3 = datalab .bigquery .Schema .from_data ([variant1 ])
9279 schema4 = datalab .bigquery .Schema .from_data ([variant2 ])
9380 schema5 = datalab .bigquery .Schema .from_data (master )
0 commit comments