Opened 16 years ago

Closed 16 years ago

#1871 defect closed fixed (fixed)

Instantiating twisted.trial.unittest.TestCase with no arguments raises nasty exception

Reported by: Jean-Paul Calderone Owned by:
Priority: highest Milestone:
Component: trial Keywords:
Cc: spiv Branch:
Author:

Description

methodName defaults to None but this doesn't seem to actually work. It probably shouldn't have any default at all, or else it should be possible to instantiate a TestCase with a None methodName.

Change History (7)

comment:1 Changed 16 years ago by spiv

Cc: spiv added

comment:2 Changed 16 years ago by Jonathan Lange

Priority: normalhigh

comment:3 Changed 16 years ago by Jonathan Lange

Status: newassigned

comment:4 Changed 16 years ago by Jonathan Lange

Keywords: review added
Owner: changed from Jonathan Lange to Jean-Paul Calderone
Priority: highhighest
Status: assignednew

pyunit also breaks horribly when you instantiate TestCases without a methodName.

I've made the parameter compulsory in source:branches/testcase-init-1871, which is ready for review.

There aren't any tests, because, well, who writes tests for method signatures?

comment:5 Changed 16 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: changed from Jean-Paul Calderone to Jonathan Lange

I can't really think of a useful test to write here, either. +1

comment:6 Changed 16 years ago by Jonathan Lange

Resolution: fixed
Status: newclosed

(In [17507]) TestCase's parameter is no longer optional

  • Author: jml
  • Reviewer: exarkun
  • Fixes #1871

TestCase used to fail badly when no methodName parameter was supplied to its constructor. This branch makes the parameter compulsory. It does technically break API compatibility with pyunit, but not in any meaningful way.

comment:7 Changed 11 years ago by <automation>

Owner: Jonathan Lange deleted
Note: See TracTickets for help on using tickets.