<s> from nose . tools import istest , assert_equal <EOL> from mammoth import style_reader <EOL> from mammoth . options import read_options , _default_style_map <EOL> @ istest <EOL> def default_style_map_is_used_if_style_map_is_not_set ( ) : <EOL> assert_equal ( _default_style_map , read_options ( { } ) . value [ "<STR_LIT>" ] ) <EOL> @ istest <EOL> def custom_style_mappings_are_prepended_to_default_style_mappings ( ) : <EOL> style_map = read_options ( { <EOL> "<STR_LIT>" : "<STR_LIT>" <EOL> } ) . value [ "<STR_LIT>" ] <EOL> assert_equal ( style_reader . read_style ( "<STR_LIT>" ) . value , style_map [ <NUM_LIT:0> ] ) <EOL> assert_equal ( _default_style_map , style_map [ <NUM_LIT:1> : ] ) <EOL> @ istest <EOL> def default_style_mappings_are_ignored_if_include_default_style_map_is_false ( ) : <EOL> style_map = read_options ( { <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : False <EOL> } ) . value [ "<STR_LIT>" ] <EOL> assert_equal ( [ style_reader . read_style ( "<STR_LIT>" ) . value ] , style_map ) <EOL> @ istest <EOL> def lines_starting_with_hash_in_custom_style_map_are_ignored ( ) : <EOL> style_map = read_options ( { <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : False <EOL> } ) . value [ "<STR_LIT>" ] <EOL> assert_equal ( [ style_reader . read_style ( "<STR_LIT>" ) . value ] , style_map ) </s>
