Message162015
| Author |
alex.75 |
| Recipients |
alex.75 |
| Date |
2012年05月31日.19:02:18 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1338490939.51.0.536223048687.issue14971@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Steps to reproduce the problem.
1. Create a module (ex. name it "test")
2. Create a file in it (ex. mainTest.py) with a class (ex. MainTest) derived from TestCase.
3. Create a test method in that class, (ex. test_base), prefix it with "test".
4. Create a decorator (ex. clear_args) and use it on the test method
5. Create a test suite with the function "loadTestsFromName" of TestLoader class and make a TestRunner run it (I use a TextTestRunner).
suite = unittest.TestLoader().loadTestsFromName('test.mainTest.MainTest.test_base')
unittest.TextTestRunner(verbosity=2).run(suite)
It is expected that the test is run (it runs without decorator).
It gives an error: no such test method in <class 'test.mainTest.MainTest'>: wrapper.
"wrapper" is the name of the returned function in the decorator.
I'm using Python 2.7.3 on Windows 7 64bit.
I search "loadTestsFromName decorator" without results, so I decided to report as new issue. This is my first report, I admit I've not read any guide/instructions. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年05月31日 19:02:19 | alex.75 | set | recipients:
+ alex.75 |
| 2012年05月31日 19:02:19 | alex.75 | set | messageid: <1338490939.51.0.536223048687.issue14971@psf.upfronthosting.co.za> |
| 2012年05月31日 19:02:18 | alex.75 | link | issue14971 messages |
| 2012年05月31日 19:02:18 | alex.75 | create |
|