This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients asvetlov, chris.jerdonek, r.david.murray
Date 2012-08-25.17:54:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1345917295.37.0.59000621262.issue14649@psf.upfronthosting.co.za>
In-reply-to
Content
> Personally I prefer to have the test case create the file(s) used in the test dynamically, writing them to the temporary working directory.

I prefer that too, but when I approached this issue, I found that test_doctest doesn't use unittest.  It uses only doctest tests to test itself, and it uses checked-in files to test things like DocTestSuite and DocFileSuite.  For example, test_DocFileSuite has this:

>>> suite = doctest.DocFileSuite('test_doctest.txt',
...                              'test_doctest2.txt',
...                              'test_doctest4.txt')

(Hence the eight supporting files I mentioned in my previous comment, of which these are three.)

Should I break the current way of doing things for this module and introduce unittest and the first dynamically created files?

> We have in the past put notes in the doc that say "this may change in the future", though that is usually about desired enhancements.

That's interesting.  It's like a "Will change in version ..." counterpart to "Changed in version ...."  Come to think of it, that could be a useful practice in general because it would let people future-proof their code more easily and give them incentives to upgrade.

To simplify things for the purposes of this issue, we can discuss adding such wording to earlier versions only if and when we actually change the future behavior.  I can create a separate issue to discuss changing future behavior once this issue is complete.
History
Date User Action Args
2012-08-25 17:54:55chris.jerdoneksetrecipients: + chris.jerdonek, r.david.murray, asvetlov
2012-08-25 17:54:55chris.jerdoneksetmessageid: <1345917295.37.0.59000621262.issue14649@psf.upfronthosting.co.za>
2012-08-25 17:54:54chris.jerdoneklinkissue14649 messages
2012-08-25 17:54:53chris.jerdonekcreate