<s> import pytest <EOL> from pytest import yield_fixture <EOL> @ yield_fixture ( scope = '<STR_LIT>' ) <EOL> def decimal_table ( cur ) : <EOL> table_name = '<STR_LIT>' <EOL> ddl = """<STR_LIT>""" . format ( table_name ) <EOL> cur . execute ( ddl ) <EOL> yield table_name <EOL> xddl = "<STR_LIT>" . format ( table_name ) <EOL> cur . execute ( xddl ) <EOL> @ pytest . mark . connect <EOL> def test_cursor_description_precision_scale ( cur , decimal_table ) : <EOL> expected = [ ( <NUM_LIT:10> , <NUM_LIT:2> ) , <EOL> ( <NUM_LIT:7> , <NUM_LIT:5> ) , <EOL> ( <NUM_LIT> , <NUM_LIT> ) ] <EOL> cur . execute ( '<STR_LIT>' . format ( decimal_table ) ) <EOL> observed = [ ( t [ <NUM_LIT:4> ] , t [ <NUM_LIT:5> ] ) for t in cur . description ] <EOL> for ( exp , obs ) in zip ( expected , observed ) : <EOL> assert exp == obs </s>
