1818
1919class Test_ArrayParamType (unittest .TestCase ):
2020 def test_it (self ):
21- from google .cloud .spanner_v1 import Type
22- from google .cloud .spanner_v1 import TypeCode
23- from google .cloud .spanner_v1 import param_types
21+ from google .cloud .spanner_v1 import Type , TypeCode , param_types
2422
2523 expected = Type (
2624 code = TypeCode .ARRAY , array_element_type = Type (code = TypeCode .INT64 )
@@ -33,15 +31,13 @@ def test_it(self):
3331
3432class Test_Struct (unittest .TestCase ):
3533 def test_it (self ):
36- from google .cloud .spanner_v1 import Type
37- from google .cloud .spanner_v1 import TypeCode
38- from google .cloud .spanner_v1 import StructType
39- from google .cloud .spanner_v1 import param_types
34+ from google .cloud .spanner_v1 import StructType , Type , TypeCode , param_types
4035
4136 struct_type = StructType (
4237 fields = [
4338 StructType .Field (name = "name" , type_ = Type (code = TypeCode .STRING )),
4439 StructType .Field (name = "count" , type_ = Type (code = TypeCode .INT64 )),
40+ StructType .Field (name = "float32" , type_ = Type (code = TypeCode .FLOAT32 )),
4541 ]
4642 )
4743 expected = Type (code = TypeCode .STRUCT , struct_type = struct_type )
@@ -50,6 +46,7 @@ def test_it(self):
5046 [
5147 param_types .StructField ("name" , param_types .STRING ),
5248 param_types .StructField ("count" , param_types .INT64 ),
49+ param_types .StructField ("float32" , param_types .FLOAT32 ),
5350 ]
5451 )
5552
@@ -58,10 +55,12 @@ def test_it(self):
5855
5956class Test_JsonbParamType (unittest .TestCase ):
6057 def test_it (self ):
61- from google .cloud .spanner_v1 import Type
62- from google .cloud .spanner_v1 import TypeCode
63- from google .cloud .spanner_v1 import TypeAnnotationCode
64- from google .cloud .spanner_v1 import param_types
58+ from google .cloud .spanner_v1 import (
59+ Type ,
60+ TypeAnnotationCode ,
61+ TypeCode ,
62+ param_types ,
63+ )
6564
6665 expected = Type (
6766 code = TypeCode .JSON ,
0 commit comments