Message133449
The following command is broken on Python 2.5/2.6
python -m unittest test_file
It outputs
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
But in Python 2.7 the same command works
----------------------------------------------------------------------
Ran 1 tests in 0.000s
OK
It is even more confusing with test class method on command line:
python26 -m unittest test_file.SomeTest
Traceback (most recent call last):
...
File "C:\~env\Python26\lib\unittest.py", line 598, in loadTestsFromName
test = obj()
File "C:\~env\Python26\lib\unittest.py", line 216, in __init__
(self.__class__, methodName)
ValueError: no such test method in <class 'test_file.SomeTest'>: runTest
---
I know that our <...> policy denies backporting such fixes to Python 2.5/2.6, but such things that make an illusion that they work while in fact they never did - see #6514, make Python really suxx. I can feel user frustration while trying to maintain 2.6 compatibility and wasting time trying to run test suite. I wouldn't mind if `-m unittest` won't work in non-supported versions, but it should at least point to bug report.
(if I'll ever switch to Ruby - this one will definitely be in the list reasons) |
|
Date |
User |
Action |
Args |
2011-04-10 07:35:31 | techtonik | set | recipients:
+ techtonik |
2011-04-10 07:35:31 | techtonik | set | messageid: <1302420931.81.0.0491321221951.issue11819@psf.upfronthosting.co.za> |
2011-04-10 07:35:31 | techtonik | link | issue11819 messages |
2011-04-10 07:35:30 | techtonik | create | |
|