On Sun, 22 Sep 2013 09:39:07 -0400, Ned Batchelder wrote: > On 9/22/13 12:09 AM, Luca Cerone wrote: >> Hi Chris, >> actually my priority is to check that the code is correct. I changed >> the syntax during the development, and I want to be sure that my >> tutorial is up to date. >> >> > If you do manage to ignore the output, how will you know that the syntax > is correct? The output for an incorrect syntax line will be an > exception, which you'll ignore. Maybe I don't know enough about the > details of doctest. It's always seemed incredibly limited to me. > Essentially, it's as if you used unittest but the only assertion you're > allowed to make is self.assertEqual(str(X), "....")
More or less :-) Doc tests really are documentation first and tests second. That's its strength. If you want unit tests, you know where to find them :-) -- Steven -- https://mail.python.org/mailman/listinfo/python-list