Index: test/dotest.py =================================================================== --- test/dotest.py +++ test/dotest.py @@ -44,7 +44,6 @@ import six - def is_exe(fpath): """Returns true if fpath is an executable.""" return os.path.isfile(fpath) and os.access(fpath, os.X_OK) Index: test/lldbtest.py =================================================================== --- test/lldbtest.py +++ test/lldbtest.py @@ -33,6 +33,8 @@ from __future__ import print_function +import lldb_shared + import abc import gc import glob @@ -48,7 +50,8 @@ import lldb import lldbtest_config import lldbutil -from _pyio import __metaclass__ + +from six import add_metaclass if sys.version_info.major < 3: import urlparse @@ -254,8 +257,8 @@ print(self.getvalue(), file=self.session) self.close() +@add_metaclass(abc.ABCMeta) class _BaseProcess(object): - __metaclass__ = abc.ABCMeta @abc.abstractproperty def pid(self): @@ -2279,6 +2282,8 @@ newattrs[attrname] = attrvalue return super(LLDBTestCaseFactory, cls).__new__(cls, name, bases, newattrs) +# Setup the metaclass for this class to change the list of the test methods when a new class is loaded +@add_metaclass(LLDBTestCaseFactory) class TestBase(Base): """ This abstract base class is meant to be subclassed. It provides default @@ -2339,9 +2344,6 @@ # Can be overridden by the LLDB_TIME_WAIT_NEXT_LAUNCH environment variable. timeWaitNextLaunch = 1.0; - # Setup the metaclass for this class to change the list of the test methods when a new class is loaded - __metaclass__ = LLDBTestCaseFactory - def doDelay(self): """See option -w of dotest.py.""" if ("LLDB_WAIT_BETWEEN_TEST_CASES" in os.environ and