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 Robert.Tasarz, r.david.murray, vstinner
Date 2013-04-12.14:09:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365775778.35.0.582838152028.issue17702@psf.upfronthosting.co.za>
In-reply-to
Content
with self.assertRaises(KeyError) as cm:
    os.environ[missing]
self.assertEqual(cm.excecption.args[0], missing)

(I don't know why assertRaises returns itself rather than just returning the exception in the with, but that's the API).
History
Date User Action Args
2013-04-12 14:09:38r.david.murraysetrecipients: + r.david.murray, vstinner, Robert.Tasarz
2013-04-12 14:09:38r.david.murraysetmessageid: <1365775778.35.0.582838152028.issue17702@psf.upfronthosting.co.za>
2013-04-12 14:09:38r.david.murraylinkissue17702 messages
2013-04-12 14:09:38r.david.murraycreate