Is there a library or python magic that allows me to perform all the functions in a file without naming them explicitly. Something very similar to what pytest does is to run all functions starting with "test _..." without ever registering them anywhere.
For example, suppose I have a.py file:
def f1(): print "f1" def f2(): print "f2"
and suppose I have a file - my main file is main.py:
if __name__ == '__main__': some_magic()
so when i call:
python main.py
The conclusion will be:
f1 f2
source share