@pytest.mark.skipif('not HAS_YAML')
def test_round_trip_empty_table():
 t = Table(dtype=[bool, 'i', 'f'], names=['a', 'b', 'c'])
 out = StringIO()
 t.write(out, format='ascii.ecsv')
 t2 = Table.read(out.getvalue(), format='ascii.ecsv')
 assert (t.dtype == t2.dtype)
 assert (len(t2) == 0)

@ pytest . mark . skipif ( 'not HAS_YAML' ) def test_round_trip_empty_table ( ) : t = Table ( dtype = [ bool , 'i' , 'f' ] , names = [ 'a' , 'b' , 'c' ] ) out = StringIO ( ) t . write ( out , format = 'ascii.ecsv' ) t2 = Table . read ( out . getvalue ( ) , format = 'ascii.ecsv' ) assert ( t . dtype == t2 . dtype ) assert ( len ( t2 ) == 0 )
test fix in #5010 for issue #5009 .