mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Refactored exception inheritance inspection tests to highlighting tests
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user