Refactored exception inheritance inspection tests to highlighting tests

This commit is contained in:
Andrey Vlasovskikh
2013-04-16 17:36:40 +04:00
parent 0c75d0a255
commit 57621dd606
3 changed files with 14 additions and 10 deletions
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>test.py</file>
<line>7</line>
<description>Exception doesn't inherit from base 'Exception' class</description>
</problem>
</problems>
@@ -0,0 +1,13 @@
def test_basic():
class A(object):
pass
class C(A):
pass
raise <warning descr="Exception doesn't inherit from base 'Exception' class">C()</warning>
class D(C, Exception):
pass
raise D()
@@ -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() {