Terry J. Reedy added the comment:
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.
----------
versions: +Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25747>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com