bobber6467 / python-nose

Automatically exported from code.google.com/p/python-nose
0 stars 0 forks source link

[patch] nose.tools should use unittest2 if available #392

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As the summary says, if `unittest2` is available, its assertions should be used.

I have written a patch for this here: 
http://code.google.com/r/wolever-python-nose-unittest2/source/detail?r=d4d0c6218
4e710d2fe3712ea8845b1f1fb709e9e

Given that unittest2 claims to be 100% backwards compatible, I don't believe 
this will create any backwards compatibility problems.

The biggest issue I can see it causing would be if a developer unknowingly uses 
unittest2 assertions, then another developer without unittest2 runs the tests. 
They would get an incredibly unhelpful `cannot import name assert_in`.

I have started to use this patch in my projects, and it seems to work there 
(although there hasn't been enough time to be sure).

Original issue reported on code.google.com by wole...@gmail.com on 16 Jan 2011 at 7:34

GoogleCodeExporter commented 8 years ago
Patch linked in github issue https://github.com/nose-devs/nose/issues/25 
closing here.

Original comment by jpelle...@gmail.com on 16 Dec 2011 at 3:11