This change enables tools like 'nose2' to execute only one single test
method, which is a great help when debugging. Plus using wraps is good
style for a wrapper.

Signed-off-by: Aaron Karper <akar...@google.com>
---
 test/py/cmdlib/testsupport/cmdlib_testcase.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/py/cmdlib/testsupport/cmdlib_testcase.py 
b/test/py/cmdlib/testsupport/cmdlib_testcase.py
index f245f45..7a45ab4 100644
--- a/test/py/cmdlib/testsupport/cmdlib_testcase.py
+++ b/test/py/cmdlib/testsupport/cmdlib_testcase.py
@@ -35,6 +35,7 @@ import inspect
 import mock
 import re
 import traceback
+import functools
 
 from cmdlib.testsupport.config_mock import ConfigMock
 from cmdlib.testsupport.iallocator_mock import patchIAllocator
@@ -396,6 +397,7 @@ def withLockedLU(func):
   the LU right before the test method is called.
 
   """
+  @functools.wraps(func)
   def wrapper(*args, **kwargs):
     test = args[0]
     assert isinstance(test, CmdlibTestCase)
-- 
2.1.0.rc2.206.gedb03e5

Reply via email to