<s> from ivoire . standalone import Example , describe <EOL> from ivoire . spec . util import ExampleWithPatch , mock <EOL> with describe ( Example , Example = ExampleWithPatch ) as it : <EOL> @ it . before <EOL> def before ( test ) : <EOL> test . name = "<STR_LIT>" <EOL> test . example_group = mock . Mock ( ) <EOL> test . example = Example ( test . name , test . example_group ) <EOL> with it ( "<STR_LIT>" ) as test : <EOL> test . assertEqual ( str ( test . example ) , test . name ) <EOL> with it ( "<STR_LIT>" ) as test : <EOL> test . assertEqual ( <EOL> repr ( test . example ) , <EOL> "<STR_LIT>" . format ( test . example ) , <EOL> ) <EOL> with it ( "<STR_LIT>" ) as test : <EOL> test . assertEqual ( test . example . group , test . example_group ) <EOL> with it ( "<STR_LIT>" ) as test : <EOL> with test . assertRaises ( AttributeError ) : <EOL> test . example . group = <NUM_LIT:12> <EOL> with it ( "<STR_LIT>" ) as test : <EOL> same = Example ( test . name , test . example_group ) <EOL> test . assertEqual ( hash ( test . example ) , hash ( same ) ) <EOL> with it ( "<STR_LIT>" ) as test : <EOL> other = Example ( test . name + "<STR_LIT>" , test . example_group ) <EOL> another = Example ( test . name , mock . Mock ( ) ) <EOL> test . assertNotEqual ( hash ( test . example ) , hash ( other ) ) <EOL> test . assertNotEqual ( hash ( test . example ) , hash ( another ) ) </s>
