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 r.david.murray
Recipients chris.jerdonek, michael.foord, r.david.murray, rbcollins, slmnhq
Date 2010-04-08.20:28:19
SpamBayes Score 0.0004779248
Marked as misclassified No
Message-id <1270758501.34.0.5188532463.issue7559@psf.upfronthosting.co.za>
In-reply-to
Content
Thank you very much for those tests.  I think you can simplify them a bit. For example, you can use assertRaises.  You also might be able to use the test_support.temp_cwd context manager in your context manager, even though you don't need the cwd part.

I've attached an alternate, simpler patch to fix this bug, based on a similar fix I did in pydoc.  The disadvantage of my patch is that it contains a hardcoding of the name of the function doing the import.  I think this is acceptable given the much greater simplicity of my patch.  I may be missing some subtlety, though, that the twisted folks know about.  Or perhaps people will just find the hardcoding itself objectionable.
History
Date User Action Args
2010-04-08 20:28:21r.david.murraysetrecipients: + r.david.murray, rbcollins, michael.foord, slmnhq, chris.jerdonek
2010-04-08 20:28:21r.david.murraysetmessageid: <1270758501.34.0.5188532463.issue7559@psf.upfronthosting.co.za>
2010-04-08 20:28:19r.david.murraylinkissue7559 messages
2010-04-08 20:28:19r.david.murraycreate