When you write some scripts that are self sufficient, is it a bad idea to use the if __name__ == '__main__' as a place to write tests?
I guess not, in fact, I saw a lot of python scripts (mostly plugins of another application) written that way.
Use if __name__ == '__main__': for tests