This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author doerwalter
Recipients
Date 2003-05-18.01:45:54
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=89016

But this can be solved with a special non-inheritable class
attribute:

class BaseTest(unittest.TestCase):
    run = False

Then the metaclass can do the following:
def __new__(cls, name, bases, dict):
    if "run" not in dict:
       dict["run"]  = True
    cls = type.__new__(cls, name, bases, dict)
    if cls.run:
        tests.append(cls)
    return cls
History
Date User Action Args
2007-08-23 15:27:04adminlinkissue736962 messages
2007-08-23 15:27:04admincreate