Message255485
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. |
|
Date |
User |
Action |
Args |
2015-11-27 20:54:18 | terry.reedy | set | recipients:
+ terry.reedy, kbk, roger.serwy, serhiy.storchaka |
2015-11-27 20:54:18 | terry.reedy | set | messageid: <1448657658.38.0.380011339247.issue25747@psf.upfronthosting.co.za> |
2015-11-27 20:54:18 | terry.reedy | link | issue25747 messages |
2015-11-27 20:54:18 | terry.reedy | create | |
|