<s> """<STR_LIT>""" <EOL> try : <EOL> from unittest import mock <EOL> except ImportError : <EOL> import mock <EOL> import pytest <EOL> def assert_equal ( left , right ) : <EOL> assert left == right <EOL> def assert_raises_and_contains ( exc , text , func , * args , ** kwargs ) : <EOL> with pytest . raises ( exc ) as excinfo : <EOL> func ( * args , ** kwargs ) <EOL> assert exc == excinfo . type <EOL> text = text if isinstance ( text , list ) else [ text ] <EOL> for item in text : <EOL> assert item in str ( excinfo . exconly ( ) ) <EOL> def assert_raises ( exc , func , * args , ** kwargs ) : <EOL> with pytest . raises ( exc ) as excinfo : <EOL> func ( * args , ** kwargs ) <EOL> assert exc == excinfo . type <EOL> def assert_in ( item , container ) : <EOL> assert item in container <EOL> def assert_not_in ( item , container ) : <EOL> assert item not in container <EOL> def assert_is ( left , right ) : <EOL> assert left is right </s>
