File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -261,12 +261,14 @@ def __init__(
261261 raise ValueError (
262262 "If the 'field_type' is 'FOREIGN', then 'foreign_type_definition' is required."
263263 )
264+ < << << << HEAD
264265 self ._properties ["type" ] = field_type
265266
267+ == == == =
268+ >> >> >> > 100708 d8 (Fix : add roundingmode as str test (#2098))
266269 if fields : # Don't set the property if it's not set.
267270 self ._properties ["fields" ] = [field .to_api_repr () for field in fields ]
268271
269-
270272 @classmethod
271273 def from_api_repr (cls , api_repr : Mapping [str , Any ]) - > "SchemaField" :
272274 """Return a ``SchemaField`` object deserialized from a dictionary.
Original file line number Diff line number Diff line change @@ -324,6 +324,11 @@ def test_fields_property(self):
324324 schema_field = self ._make_one ("boat" , "RECORD" , fields = fields )
325325 self .assertEqual (schema_field .fields , fields )
326326
327+ def test_roundingmode_property_str (self ):
328+ ROUNDINGMODE = "ROUNDING_MODE_UNSPECIFIED"
329+ schema_field = self ._make_one ("test" , "STRING" , rounding_mode = ROUNDINGMODE )
330+ self .assertEqual (schema_field .rounding_mode , ROUNDINGMODE )
331+
327332 def test_to_standard_sql_simple_type (self ):
328333 examples = (
329334 # a few legacy types
You can’t perform that action at this time.
0 commit comments