Issue 383 in rietveld: loadTestsFromName does not work on method with a decorator

1 view
Skip to first unread message

riet...@googlecode.com

unread,
May 31, 2012, 1:51:35 PM5/31/12
to coderev...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 383 by alessand...@gmail.com: loadTestsFromName does not work on
method with a decorator
http://code.google.com/p/rietveld/issues/detail?id=383

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'm accessing by code.google.com.

riet...@googlecode.com

unread,
May 31, 2012, 1:56:46 PM5/31/12
to coderev...@googlegroups.com
Updates:
Status: Invalid

Comment #1 on issue 383 by gvanros...@gmail.com: loadTestsFromName does not
This bug has nothing to do with Rietveld. If you think this is a Python
bug, please use the Python bug tracker: bugs.python.org.

riet...@googlecode.com

unread,
May 31, 2012, 3:09:36 PM5/31/12
to coderev...@googlegroups.com

Comment #2 on issue 383 by alessand...@gmail.com: loadTestsFromName does
not work on method with a decorator
http://code.google.com/p/rietveld/issues/detail?id=383

Sorry.
I reported this bug (I think it is) in Python tracker like you suggest.
Thank you.

Reply all
Reply to author
Forward
0 new messages