<s> import testify as T <EOL> from testify . contrib . doctestcase import DocTestCase <EOL> class TurtleTestCase ( T . TestCase ) : <EOL> @ T . setup <EOL> def build_turtle ( self ) : <EOL> self . leonardo = T . turtle . Turtle ( ) <EOL> def test_call ( self ) : <EOL> """<STR_LIT>""" <EOL> ret = self . leonardo ( ) <EOL> assert ret <EOL> T . assert_length ( self . leonardo . returns , <NUM_LIT:1> ) <EOL> T . assert_call ( self . leonardo , <NUM_LIT:0> ) <EOL> T . assert_equal ( ret , self . leonardo . returns [ <NUM_LIT:0> ] ) <EOL> def test_attribute ( self ) : <EOL> """<STR_LIT>""" <EOL> assert self . leonardo . is_awesome ( ) . and_can_chain ( ) . whatever_he_wants ( ) <EOL> def test_call_record ( self ) : <EOL> """<STR_LIT>""" <EOL> self . leonardo ( <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , quatro = <NUM_LIT:4> ) <EOL> T . assert_length ( self . leonardo . calls , <NUM_LIT:1> ) <EOL> T . assert_call ( self . leonardo , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , quatro = <NUM_LIT:4> ) <EOL> self . leonardo ( <NUM_LIT:5> , six = <NUM_LIT:6> ) <EOL> T . assert_call ( self . leonardo , <NUM_LIT:1> , <NUM_LIT:5> , six = <NUM_LIT:6> ) <EOL> def test_attribute_setting ( self ) : <EOL> """<STR_LIT>""" <EOL> self . leonardo . color = "<STR_LIT>" <EOL> T . assert_equal ( self . leonardo . color , "<STR_LIT>" ) <EOL> def test_attribute_persistence ( self ) : <EOL> """<STR_LIT>""" <EOL> weapon = self . leonardo . weapon <EOL> T . assert_equal ( weapon , self . leonardo . weapon ) <EOL> assert weapon is self . leonardo . weapon <EOL> class DocTest ( DocTestCase ) : <EOL> module = T . turtle </s>
