@pytest.fixture(scope='session')
def unicode_encode_err():
 return UnicodeEncodeError('ascii', '', 0, 2, 'fake exception')

@ pytest . fixture ( scope = 'session' ) def unicode_encode_err ( ) : return UnicodeEncodeError ( 'ascii' , '' , 0 , 2 , 'fake exception' )
provide a fake unicodeencodeerror exception .