'Check test modules collected which raise ImportError with unicode messages
are handled properly (#2336).'

def test_show_traceback_import_error_unicode(self, testdir):

    testdir.makepyfile(u"\n                                                #    -*-    coding:    utf-8    -*-\n                                                raise    ImportError(u'Something    bad    happened    \u263a')\n                                ")
    result = testdir.runpytest()
    result.stdout.fnmatch_lines(['ImportError    while    importing    test    module*', 'Traceback:', '*raise    ImportError*Something    bad    happened*'])
    assert (result.ret == 2)
