@@ -55,7 +55,6 @@ def test_constructor_defaults(self):
5555
5656 def test_constructor_explicit (self ):
5757 FIELD_DEFAULT_VALUE_EXPRESSION = "This is the default value for this field"
58- ROUNDINGMODE = enums .RoundingMode .ROUNDING_MODE_UNSPECIFIED
5958 field = self ._make_one (
6059 "test" ,
6160 "STRING" ,
@@ -68,7 +67,7 @@ def test_constructor_explicit(self):
6867 )
6968 ),
7069 default_value_expression = FIELD_DEFAULT_VALUE_EXPRESSION ,
71- rounding_mode = ROUNDINGMODE ,
70+ rounding_mode = enums . RoundingMode . ROUNDING_MODE_UNSPECIFIED ,
7271 foreign_type_definition = "INTEGER" ,
7372 )
7473 self .assertEqual (field .name , "test" )
@@ -86,7 +85,7 @@ def test_constructor_explicit(self):
8685 )
8786 ),
8887 )
89- self .assertEqual (field .rounding_mode , ROUNDINGMODE . name )
88+ self .assertEqual (field .rounding_mode , "ROUNDING_MODE_UNSPECIFIED" )
9089 self .assertEqual (field .foreign_type_definition , "INTEGER" )
9190
9291 def test_constructor_explicit_none (self ):
@@ -303,12 +302,10 @@ def test_fields_property(self):
303302 self .assertEqual (schema_field .fields , fields )
304303
305304 def test_roundingmode_property_str (self ):
306- # via init
307305 ROUNDINGMODE = "ROUND_HALF_AWAY_FROM_ZERO"
308306 schema_field = self ._make_one ("test" , "STRING" , rounding_mode = ROUNDINGMODE )
309307 self .assertEqual (schema_field .rounding_mode , ROUNDINGMODE )
310308
311- # via _properties
312309 del schema_field
313310 schema_field = self ._make_one ("test" , "STRING" )
314311 schema_field ._properties ["roundingMode" ] = ROUNDINGMODE
@@ -514,18 +511,6 @@ def test_to_standard_sql_foreign_type_valid(self):
514511 self .assertEqual (standard_field .name , "some_field" )
515512 self .assertEqual (standard_field .type .type_kind , standard_type )
516513
517- def test_to_standard_sql_foreign_type_invalid (self ):
518- legacy_type = "FOREIGN"
519- foreign_type_definition = None
520-
521- with self .assertRaises (ValueError ) as context :
522- self ._make_one (
523- "some_field" ,
524- field_type = legacy_type ,
525- foreign_type_definition = foreign_type_definition ,
526- )
527- self .assertTrue ("If the 'field_type'" in context .exception .args [0 ])
528-
529514 def test___eq___wrong_type (self ):
530515 field = self ._make_one ("test" , "STRING" )
531516 other = object ()
0 commit comments