Opened 5 years ago

Last modified 5 years ago

#4174 defect new

trial exits with unhandled exception when using default reporter and a test has overridden `id` somehow

Reported by: exarkun Owned by:
Priority: normal Milestone:
Component: trial Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

from twisted.trial.unittest import TestCase

class Broken(TestCase):
    def setUp(self):
        self.id = None


    def test_foo(self):
        1 / 0

This failure brought to you by inheritance and the number 7.

Change History (3)

comment:1 Changed 5 years ago by jml

What's the expected behaviour?

comment:2 Changed 5 years ago by exarkun

Handle the exception, report the problem in a user-friendly way. Make it easy and obvious to the person running trial how the test code is flawed.

comment:3 Changed 3 years ago by <automation>

  • Owner jml deleted
Note: See TracTickets for help on using tickets.