@pytest.mark.parametrize('encoding', [None, 'UTF-8', 'unicode_escape'])
def test_issue(encoding):
 context = None
 text2 = ''
 expected_text = u'\u043f\u043e \u0440\u0443\u0441\u0441\u043a\u0438'
 try:
  problematic_step_impl(context)
 except Exception:
  text2 = traceback.format_exc()
 text3 = text(text2, encoding)
 print((u'EXCEPTION-TEXT: %s' % text3))
 assert_that(text3, contains_string(u'raise Exception(u"\u043f\u043e \u0440\u0443\u0441\u0441\u043a\u0438"'))
 assert_that(text3, contains_string(u'Exception: \u043f\u043e \u0440\u0443\u0441\u0441\u043a\u0438'))

@ pytest . mark . parametrize ( 'encoding' , [ None , 'UTF-8' , 'unicode_escape' ] ) def test_issue ( encoding ) : context = None text2 = '' expected_text = u'\u043f\u043e \u0440\u0443\u0441\u0441\u043a\u0438' try : problematic_step_impl ( context ) except Exception : text2 = traceback . format_exc ( ) text3 = text ( text2 , encoding ) print ( ( u'EXCEPTION-TEXT: %s' % text3 ) ) assert_that ( text3 , contains_string ( u'raise Exception(u"\u043f\u043e \u0440\u0443\u0441\u0441\u043a\u0438"' ) ) assert_that ( text3 , contains_string ( u'Exception: \u043f\u043e \u0440\u0443\u0441\u0441\u043a\u0438' ) )
with encoding=utf-8: file "/users/jens/se/behave_main .