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 brett.cannon
Recipients anish.shah, brett.cannon, giampaolo.rodola, gvanrossum, marco.buttu, vstinner, yselivanov
Date 2016-02-11.17:54:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455213270.54.0.111398397068.issue26182@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-02-11 17:54:30brett.cannonsetrecipients: + brett.cannon, gvanrossum, vstinner, giampaolo.rodola, yselivanov, marco.buttu, anish.shah
2016-02-11 17:54:30brett.cannonsetmessageid: <1455213270.54.0.111398397068.issue26182@psf.upfronthosting.co.za>
2016-02-11 17:54:30brett.cannonlinkissue26182 messages
2016-02-11 17:54:30brett.cannoncreate