JetBrains / teamcity-messages

Python Unit Test Reporting to TeamCity
https://pypi.python.org/pypi/teamcity-messages
Apache License 2.0
138 stars 81 forks source link

UnicodeEncodeError on IronPython with non-ascii text in skipped message #139

Open throwable-one opened 7 years ago

throwable-one commented 7 years ago
# -*- coding: utf-8 -*-
import unittest

class TestCase(unittest.TestCase):
    @unittest.skip(u"Здесь ошибка")
    def test(self):
        self.assertEqual(2+2, 5)
  File "C:\Program Files (x86)\IronPython 2.7\Lib\unittest\main.py", line 95, in __init__
  File "C:\Program Files (x86)\IronPython 2.7\Lib\unittest\main.py", line 232, in runTests
  File "C:\ultimate\out\classes\production\python-helpers\pycharm\teamcity\unittestpy.py", line 78, in addSkip
  File "C:\ultimate\out\classes\production\python-helpers\pycharm\teamcity\unittestpy.py", line 270, in run
  File "C:\Program Files (x86)\IronPython 2.7\Lib\unittest\runner.py", line 151, in run
  File "C:\Program Files (x86)\IronPython 2.7\Lib\unittest\suite.py", line 70, in __call__
  File "C:\Program Files (x86)\IronPython 2.7\Lib\unittest\suite.py", line 108, in run
  File "C:\Program Files (x86)\IronPython 2.7\Lib\unittest\suite.py", line 70, in __call__
  File "C:\Program Files (x86)\IronPython 2.7\Lib\unittest\suite.py", line 108, in run
  File "C:\Program Files (x86)\IronPython 2.7\Lib\unittest\suite.py", line 70, in __call__
  File "C:\Program Files (x86)\IronPython 2.7\Lib\unittest\suite.py", line 108, in run
  File "C:\Program Files (x86)\IronPython 2.7\Lib\unittest\case.py", line 393, in __call__
  File "C:\Program Files (x86)\IronPython 2.7\Lib\unittest\case.py", line 313, in run
  File "C:\Program Files (x86)\IronPython 2.7\Lib\unittest\case.py", line 289, in _addSkip
  File "C:\ultimate\out\classes\production\python-helpers\pycharm\teamcity\common.py", line 96, in to_unicode
UnicodeEncodeError: ('ascii', u'\u0417', 0, 1, "'ascii' codec can't decode byte 417 in position 0: ordinal not in range")