How to doctest if __name__ already used?

2006-05-05 Thread Leo Breebaart
I have a simple question (I hope), but one I'd love to get some feedback on in case I am missing something obvious: If I have a Python script that is executable, and therefore already uses '''if __name__ == "__main__"''' to call a function of its own, what is then the easiest yet still most Python

Re: How to doctest if __name__ already used?

2006-05-07 Thread Chris Lambacher
On Fri, May 05, 2006 at 10:33:48PM +, Leo Breebaart wrote: > Trigger doctest.testmod() via a "--test" command-line option, is > what I'm thinking. But is that really the best way? That is what I would have suggested. -Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: How to doctest if __name__ already used?

2006-05-07 Thread Jay Parlar
On May 5, 2006, at 10:33 PM, Leo Breebaart wrote: > I have a simple question (I hope), but one I'd love to get some > feedback on in case I am missing something obvious: > > If I have a Python script that is executable, and therefore > already uses '''if __name__ == "__main__"''' to call a functi