JetBrains / teamcity-messages

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

exception thrown when tests fail with trial #198

Closed throwable-one closed 5 years ago

throwable-one commented 5 years ago
from twisted.trial import unittest
from twisted.internet.defer import inlineCallbacks
from twisted.internet import defer, reactor

def badCode(d):
    raise Exception('boom!')
    d.callback(None)

class TestFailure(unittest.TestCase):

    @inlineCallbacks
    def testBadCode(self):
        d = defer.Deferred()
        reactor.callLater(0.1, badCode, d)
        yield d.addTimeout(0.2, reactor)

result File "c:\python37\lib\site-packages\twisted\plugins\teamcity_plugin.py", line 11, in getitem return self.value[key] TypeError: 'Exception' object is not subscriptable

throwable-one commented 5 years ago

https://youtrack.jetbrains.com/issue/PY-32694