File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
sdks/python/apache_beam/io Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -337,17 +337,16 @@ def test_write_batched_display_data(self):
337337 ARROW_MAJOR_VERSION >= 13 ,
338338 'pyarrow 13.x and above does not throw ArrowInvalid error' )
339339 def test_sink_transform_int96 (self ):
340- dst = tempfile .NamedTemporaryFile ()
341- path = dst .name
342- # pylint: disable=c-extension-no-member
343340 with self .assertRaisesRegex (Exception , 'would lose data' ):
344341 # Should throw an error "ArrowInvalid: Casting from timestamp[ns] to
345342 # timestamp[us] would lose data"
346- with TestPipeline () as p :
347- _ = p \
348- | Create (self .RECORDS ) \
349- | WriteToParquet (
350- path , self .SCHEMA96 , num_shards = 1 , shard_name_template = '' )
343+ with tempfile .NamedTemporaryFile () as dst :
344+ path = dst .name
345+ with TestPipeline () as p :
346+ _ = p \
347+ | Create (self .RECORDS ) \
348+ | WriteToParquet (
349+ path , self .SCHEMA96 , num_shards = 1 , shard_name_template = '' )
351350
352351 def test_sink_transform (self ):
353352 with TemporaryDirectory () as tmp_dirname :
You can’t perform that action at this time.
0 commit comments