diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index d100ec2..9e1a883 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -44,6 +44,8 @@ pjoin = path.join # Enable printing all warnings raise by IPython's modules +if sys.version_info > (3,0): + warnings.filterwarnings('error', message='.*', category=ResourceWarning, module='.*') warnings.filterwarnings('default', message='.*', category=Warning, module='IPy.*') if version_info < (6,): diff --git a/IPython/testing/tests/test_tools.py b/IPython/testing/tests/test_tools.py index a4c2e77..9c6db65 100644 --- a/IPython/testing/tests/test_tools.py +++ b/IPython/testing/tests/test_tools.py @@ -132,3 +132,9 @@ class Test_ipexec_validate(unittest.TestCase, tt.TempFileMixin): ) out = "A\r\nB" tt.ipexec_validate(self.fname, expected_out=out, expected_err="C\r\nD") + + + def tearDown(self): + # tear down correctly the mixin, + # unittest.TestCase.tearDown does nothing + tt.TempFileMixin.tearDown(self)