diff --git a/python/testData/inspections/PyExceptionInheritInspection/expected.xml b/python/testData/inspections/PyExceptionInheritInspection/expected.xml deleted file mode 100644 index 81e336142662..000000000000 --- a/python/testData/inspections/PyExceptionInheritInspection/expected.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - test.py - 7 - Exception doesn't inherit from base 'Exception' class - - \ No newline at end of file diff --git a/python/testData/inspections/PyExceptionInheritInspection/test.py b/python/testData/inspections/PyExceptionInheritInspection/test.py new file mode 100644 index 000000000000..df9883b912cb --- /dev/null +++ b/python/testData/inspections/PyExceptionInheritInspection/test.py @@ -0,0 +1,13 @@ +def test_basic(): + class A(object): + pass + + class C(A): + pass + + raise C() + + class D(C, Exception): + pass + + raise D() \ No newline at end of file diff --git a/python/testSrc/com/jetbrains/python/PythonInspectionsTest.java b/python/testSrc/com/jetbrains/python/PythonInspectionsTest.java index 73a820b1c342..c6d2f0550c05 100644 --- a/python/testSrc/com/jetbrains/python/PythonInspectionsTest.java +++ b/python/testSrc/com/jetbrains/python/PythonInspectionsTest.java @@ -110,8 +110,7 @@ public class PythonInspectionsTest extends PyTestCase { } public void testPyExceptionInheritInspection() { - LocalInspectionTool inspection = new PyExceptionInheritInspection(); - doTest(getTestName(false), inspection); + doHighlightingTest(PyExceptionInheritInspection.class); } public void testPyDefaultArgumentInspection() {