<s> from twisted . trial import unittest <EOL> from imaginary . test import commandutils <EOL> from imaginary . test . commandutils import E <EOL> from imaginary import objects , iimaginary <EOL> class HitTestCase ( commandutils . CommandTestCaseMixin , unittest . TestCase ) : <EOL> def testHit ( self ) : <EOL> self . _test ( <EOL> "<STR_LIT>" , <EOL> [ E ( "<STR_LIT>" ) ] ) <EOL> self . _test ( <EOL> "<STR_LIT>" , <EOL> [ E ( "<STR_LIT>" ) ] ) <EOL> actor = iimaginary . IActor ( self . player ) <EOL> actor . stamina . current = <NUM_LIT:0> <EOL> self . _test ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] ) <EOL> actor . stamina . current = actor . stamina . max <EOL> x , y = self . _test ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" ] ) <EOL> self . assertEquals ( x [ <NUM_LIT:1> ] . groups ( ) , y [ <NUM_LIT:0> ] . groups ( ) ) <EOL> actor . stamina . current = actor . stamina . max <EOL> x , y = self . _test ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" ] ) <EOL> self . assertEquals ( x [ <NUM_LIT:1> ] . groups ( ) , y [ <NUM_LIT:0> ] . groups ( ) ) <EOL> monster = objects . Thing ( store = self . store , name = u"<STR_LIT>" ) <EOL> objects . Actor . createFor ( monster ) <EOL> monster . moveTo ( self . location ) <EOL> x , y = self . _test ( <EOL> "<STR_LIT>" , <EOL> [ "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" ] ) <EOL> monster . destroy ( ) <EOL> def testInvalidAttacks ( self ) : <EOL> self . _test ( <EOL> "<STR_LIT>" , <EOL> [ E ( "<STR_LIT>" ) ] , <EOL> [ ] ) <EOL> obj = objects . Thing ( store = self . store , name = u"<STR_LIT>" ) <EOL> obj . moveTo ( self . location ) <EOL> self . _test ( <EOL> "<STR_LIT>" , <EOL> [ E ( "<STR_LIT>" ) ] , <EOL> [ ] ) </s>
