<s> from nose . tools import * <EOL> import weigh_in <EOL> def test_inverses ( ) : <EOL> """<STR_LIT>""" <EOL> vals = [ <EOL> ( <NUM_LIT> , <NUM_LIT> ) , <EOL> ( <NUM_LIT> , None ) , <EOL> ( <NUM_LIT> , <NUM_LIT> ) , <EOL> ( <NUM_LIT> , <NUM_LIT> ) , <EOL> ( <NUM_LIT> , <NUM_LIT> ) <EOL> ] <EOL> for current_size , prev_size in vals : <EOL> desc = weigh_in . format_description ( current_size , prev_size ) <EOL> back_cur_size , back_prev_size = weigh_in . parse_description ( desc ) <EOL> assert back_cur_size == current_size , ( desc , back_cur_size ) <EOL> assert back_prev_size == prev_size , ( desc , back_prev_size ) </s>
