<s> import six <EOL> from agate import Table <EOL> from agate . data_types import * <EOL> from agate . testcase import AgateTestCase <EOL> class TestPrintStructure ( AgateTestCase ) : <EOL> def setUp ( self ) : <EOL> self . rows = ( <EOL> ( '<STR_LIT>' , <NUM_LIT> , '<STR_LIT:a>' ) , <EOL> ( '<STR_LIT>' , None , None ) , <EOL> ( '<STR_LIT:0>' , <NUM_LIT:1> , '<STR_LIT:c>' ) <EOL> ) <EOL> self . number_type = Number ( ) <EOL> self . international_number_type = Number ( locale = '<STR_LIT>' ) <EOL> self . text_type = Text ( ) <EOL> self . column_names = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> self . column_types = [ <EOL> self . number_type , <EOL> self . international_number_type , <EOL> self . text_type <EOL> ] <EOL> def test_print_structure ( self ) : <EOL> table = Table ( self . rows , self . column_names , self . column_types ) <EOL> output = six . StringIO ( ) <EOL> table . print_structure ( output = output ) <EOL> lines = output . getvalue ( ) . strip ( ) . split ( '<STR_LIT:\n>' ) <EOL> self . assertEqual ( len ( lines ) , <NUM_LIT:7> ) </s>
