<s> from ivoire import describe <EOL> from ivoire . manager import Context <EOL> from ivoire . spec . util import ExampleWithPatch , mock <EOL> with describe ( Context , Example = ExampleWithPatch ) as it : <EOL> @ it . before <EOL> def before ( test ) : <EOL> test . manager = mock . Mock ( ) <EOL> test . context = Context ( "<STR_LIT>" , test . manager ) <EOL> with it ( "<STR_LIT>" ) as test : <EOL> with test . context : <EOL> test . manager . enter . assert_called_once_with ( test . context ) <EOL> test . manager . exit . assert_called_once_with ( ) </s>
