[Python-Dev] Proposed unittest changes
Steve Holden
steve at holdenweb.com
Mon Jul 14 01:27:55 CEST 2008
Michael Foord wrote:
> Ben Finney wrote:
>> Howdy Michael,
>>
>> I'm interested in the changes you're proposing for Python's 'unittest'
>> module. I am (like, I suspect, many Python coders) maintaining my own
>> set of extensions to the module across many projects, so I'd really
>> like to see many of the improvements you discuss actually in the
>> standard library.
>>
>> What assistance can I offer to help on this issue?
>>
>>
> I intend to start working on them in August, after I have finished my
> current writing commitments.
>
> The full list of changes proposed (feel free to start - but ping me or
> the list) and not shot down was something like:
>
> Documenting that the assert method names are to be preferred over the
> 'FailUnless' names (this stirred up some controversy this weekend so
> should probably not happen).
>
>
> Adding the following new asserts:
>
> assertIn (member, container, msg=None)
> assertNotIn (member, container, msg=None)
> assertIs (first, second, msg=None)
> assertNotIs (first, second, msg=None)
Please, let's call this one "assertIsNot". I know it's valid Python to say
if a not is b:
but it's a much less natural way of expressing the condition, and (for
all I know) might even introduce an extra negation operation. "is not"
is, I believe, treated as a single operator.
> [...]
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-Dev
mailing list