Quickies

[categories] [index] [all (527)] [latest]

Python
  1. import inspect
    

    from inside the object

    test_methods = inspect.getmembers(self, lambda f:inspect.ismethod(f) and f.__name__.startswith('test_'))
    
    for (f_name, f) in test_methods:
        f()