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 michael.foord
Recipients michael.foord, ncoghlan
Date 2010-06-29.14:13:35
SpamBayes Score 0.027576229
Marked as misclassified No
Message-id <1277820818.27.0.694811645077.issue9110@psf.upfronthosting.co.za>
In-reply-to
Content
Hey Nick,

The tests are pretty much just copied from the previous version, so they aren't all appropriate. In fact I think that the first two tests (and even the typo tests) can just go as they really just test Python semantics and not the ContextDecorator itself.

The method tests are testing that the arguments (including keyword arguments) are properly passed through to the decorated function. I started to write a comment to that effect as I realised it wasn't obvious, but forgot to finish the comment... Separate instantiations just mean we don't need to worry about previous values.

(I did them as methods as I was *starting* to write a test for general descriptor decorating - but the general case for that is very hard to solve so people just have to use their decorators in the right order instead. Nonetheless it is nice to have a test that decorates a method as well as the other function decorating tests.)

Your improvement to the exceptions tests are good.
History
Date User Action Args
2010-06-29 14:13:38michael.foordsetrecipients: + michael.foord, ncoghlan
2010-06-29 14:13:38michael.foordsetmessageid: <1277820818.27.0.694811645077.issue9110@psf.upfronthosting.co.za>
2010-06-29 14:13:36michael.foordlinkissue9110 messages
2010-06-29 14:13:35michael.foordcreate