Re: Unittest2 on python 2.6

2012-03-18 Thread Terry Reedy
On 3/18/2012 4:55 PM, Andrea Crotti wrote: On 03/18/2012 03:46 PM, Terry Reedy wrote: 1. If the difference between unittest and unittest2 is strictly a matter of deletions and addition, replace unittest with the union of the two. 2. Put the try/except dance in a compat file. Then everywhere els

Re: Unittest2 on python 2.6

2012-03-18 Thread Andrea Crotti
On 03/18/2012 03:46 PM, Terry Reedy wrote: 1. If the difference between unittest and unittest2 is strictly a matter of deletions and addition, replace unittest with the union of the two. 2. Put the try/except dance in a compat file. Then everywhere else 'from compat import unittest'. This ide

Re: Unittest2 on python 2.6

2012-03-18 Thread Terry Reedy
On 3/18/2012 9:31 AM, Andrea Crotti wrote: Suppose we want to use the unittest from Python 2.7, but also want to support Python 2.6, what is the best way to do it? The solution used now is to have in setup.py if sys.version < '2.7': tests_require.append('unittest2') and then in every test file