for name in list(vars(cls)):
    if name.startswith('test_') and callable(getattr(cls, name)):
        delattr(cls, name)
Python - how can I dynamically remove a method from a class -- i.e. opposite of setattr