From 306e3c2b9bc30123552e43b874e19daeae2b842d 2015-04-28 23:51:14 From: Matthias Bussonnier Date: 2015-04-28 23:51:14 Subject: [PATCH] move custom exception at module. fix test on python3.5+ where the qualified name include methods name as well as if defined in local scope. --- diff --git a/IPython/core/tests/test_interactiveshell.py b/IPython/core/tests/test_interactiveshell.py index 052df25..afe6544 100644 --- a/IPython/core/tests/test_interactiveshell.py +++ b/IPython/core/tests/test_interactiveshell.py @@ -50,6 +50,9 @@ ip = get_ipython() # Tests #----------------------------------------------------------------------------- +class DerivedInterrupt(KeyboardInterrupt): + pass + class InteractiveShellTestCase(unittest.TestCase): def test_naked_string_cells(self): """Test that cells with only naked strings are fully executed""" @@ -502,8 +505,6 @@ class InteractiveShellTestCase(unittest.TestCase): msg = ip.get_exception_only() self.assertEqual(msg, 'KeyboardInterrupt\n') - class DerivedInterrupt(KeyboardInterrupt): - pass try: raise DerivedInterrupt("foo") except KeyboardInterrupt: