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 terry.reedy
Recipients kbk, roger.serwy, serhiy.storchaka, terry.reedy
Date 2015-11-27.20:54:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448657658.38.0.380011339247.issue25747@psf.upfronthosting.co.za>
In-reply-to
Content
The test method was added in 3.5.

       with warnings.catch_warnings(record=True) as w:
            warnings.simplefilter("always")
            import idlelib.idlever
            self.assertEqual(len(w), 1)
            self.assertTrue(issubclass(w[-1].category, DeprecationWarning))
            self.assertIn("version", str(w[-1].message))

It is copied replacements from https://docs.python.org/3.6/library/warnings.html#testing-warnings.

I see that test.support has a wrapper that might or might be easier or make a difference.

Replacing "import idlelib.idlever" with "test.support.import_fresh_module('idlelib.idlever')" might fix the problem.  I will test after I install the 10GB VS2015 package needed to build 3.5/6 on Windows.
History
Date User Action Args
2015-11-27 20:54:18terry.reedysetrecipients: + terry.reedy, kbk, roger.serwy, serhiy.storchaka
2015-11-27 20:54:18terry.reedysetmessageid: <1448657658.38.0.380011339247.issue25747@psf.upfronthosting.co.za>
2015-11-27 20:54:18terry.reedylinkissue25747 messages
2015-11-27 20:54:18terry.reedycreate