Message260118
You need to temporarily turn on warnings for it to work. For example:
with warnings.catch_warnings():
warnings.simplefilter('always')
with self.assertWarnsRegex(DeprecationWarning, "reserved keyword"):
exec('async = 33')
Do notice I used exec() as otherwise the warning will be triggered at import instead of when the test runs. |
|
Date |
User |
Action |
Args |
2016-02-11 17:54:30 | brett.cannon | set | recipients:
+ brett.cannon, gvanrossum, vstinner, giampaolo.rodola, yselivanov, marco.buttu, anish.shah |
2016-02-11 17:54:30 | brett.cannon | set | messageid: <1455213270.54.0.111398397068.issue26182@psf.upfronthosting.co.za> |
2016-02-11 17:54:30 | brett.cannon | link | issue26182 messages |
2016-02-11 17:54:30 | brett.cannon | create | |
|