diff options
| author | Terry Jan Reedy <tjreedy@udel.edu> | 2015-09-09 06:10:35 (GMT) |
|---|---|---|
| committer | Terry Jan Reedy <tjreedy@udel.edu> | 2015-09-09 06:10:35 (GMT) |
| commit | 52ee2471b3e0a62db47e36f7f8fe7a2c24ac1ff9 (patch) | |
| tree | 05dd6322d1fd99a249714fcc5b3b1ae46f6ce102 /Lib/idlelib/idle_test/test_warning.py | |
| parent | 6a563b683952bf3f77fa7c5e1999e004c2947857 (diff) | |
| parent | 78d915aa3e12300118f0f274ead583713197ead7 (diff) | |
| download | cpython-52ee2471b3e0a62db47e36f7f8fe7a2c24ac1ff9.zip cpython-52ee2471b3e0a62db47e36f7f8fe7a2c24ac1ff9.tar.gz cpython-52ee2471b3e0a62db47e36f7f8fe7a2c24ac1ff9.tar.bz2 | |
Merge with 3.4
Diffstat (limited to 'Lib/idlelib/idle_test/test_warning.py')
| -rw-r--r-- | Lib/idlelib/idle_test/test_warning.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/idlelib/idle_test/test_warning.py b/Lib/idlelib/idle_test/test_warning.py index 18627dd..54ac993 100644 --- a/Lib/idlelib/idle_test/test_warning.py +++ b/Lib/idlelib/idle_test/test_warning.py @@ -68,6 +68,15 @@ class ShellWarnTest(unittest.TestCase): 'Test', UserWarning, 'test_warning.py', 99, f, 'Line of code') self.assertEqual(shellmsg.splitlines(), f.getvalue().splitlines()) +class ImportWarnTest(unittest.TestCase): + def test_idlever(self): + 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)) + if __name__ == '__main__': unittest.main(verbosity=2, exit=False) |
