mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix tests related to project roots
This commit is contained in:
@@ -63,7 +63,7 @@ public abstract class PyExecutionFixtureTestTask extends PyTestTask {
|
||||
|
||||
final boolean customTestData = !testDataPath.equals(getDefaultTestDataPath());
|
||||
// No need to set default testdata as module root: too many data to index and useless
|
||||
if (customTestData) {
|
||||
if (customTestData || shouldAddDataPathToContentRoots()) {
|
||||
moduleFixtureBuilder.addSourceContentRoot(testDataPath);
|
||||
}
|
||||
final List<String> contentRoots = getContentRoots();
|
||||
@@ -79,6 +79,10 @@ public abstract class PyExecutionFixtureTestTask extends PyTestTask {
|
||||
return PythonTestUtil.getTestDataPath();
|
||||
}
|
||||
|
||||
protected boolean shouldAddDataPathToContentRoots() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected List<String> getContentRoots() {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
|
||||
@@ -278,6 +278,11 @@ public class PythonDebuggerTest extends PyEnvTestCase {
|
||||
@Test
|
||||
public void testStepIntoMyCode() throws Exception {
|
||||
runPythonTest(new PyDebuggerTask("/debug", "test_my_code.py") {
|
||||
@Override
|
||||
protected boolean shouldAddDataPathToContentRoots() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void before() throws Exception {
|
||||
toggleBreakpoint(getScriptPath(), 5);
|
||||
@@ -473,6 +478,11 @@ public class PythonDebuggerTest extends PyEnvTestCase {
|
||||
@Test
|
||||
public void testExceptionBreakpointIgnoreLibrariesOnRaise() throws Exception {
|
||||
runPythonTest(new PyDebuggerTask("/debug", "test_ignore_lib.py") {
|
||||
@Override
|
||||
protected boolean shouldAddDataPathToContentRoots() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void before() throws Exception {
|
||||
createExceptionBreak(myFixture, false, true, true);
|
||||
@@ -497,6 +507,11 @@ public class PythonDebuggerTest extends PyEnvTestCase {
|
||||
@Test
|
||||
public void testExceptionBreakpointIgnoreLibrariesOnTerminate() throws Exception {
|
||||
runPythonTest(new PyDebuggerTask("/debug", "test_ignore_lib.py") {
|
||||
@Override
|
||||
protected boolean shouldAddDataPathToContentRoots() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void before() throws Exception {
|
||||
createExceptionBreak(myFixture, true, false, true);
|
||||
@@ -880,6 +895,11 @@ public class PythonDebuggerTest extends PyEnvTestCase {
|
||||
@Test
|
||||
public void testSteppingFilter() throws Exception {
|
||||
runPythonTest(new PyDebuggerTask("/debug", "test_stepping_filter.py") {
|
||||
@Override
|
||||
protected boolean shouldAddDataPathToContentRoots() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void before() throws Exception {
|
||||
toggleBreakpoint(getScriptPath(), 4);
|
||||
|
||||
Reference in New Issue
Block a user