[Lldb-commits] [lldb] r121538 - /lldb/trunk/test/lldbtest.py

Johnny Chen johnny.chen at apple.com
Fri Dec 10 13:33:31 PST 2010


Author: johnny
Date: Fri Dec 10 15:33:31 2010
New Revision: 121538

URL: http://llvm.org/viewvc/llvm-project?rev=121538&view=rev
Log:
Make sure that @python_api_test is only used to decorate a test method, not the
test class.

Modified:
    lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=121538&r1=121537&r2=121538&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Fri Dec 10 15:33:31 2010
@@ -230,6 +230,8 @@
 from functools import wraps
 def python_api_test(func):
     """Decorate the item as a Python API only test."""
+    if isinstance(func, type) and issubclass(func, unittest2.TestCase):
+        raise Exception("@python_api_test can only be used to decorate a test method")
     @wraps(func)
     def wrapper(self, *args, **kwargs):
         if lldb.dont_do_python_api_test:





More information about the lldb-commits mailing list