Skip to content

Commit

Permalink
More test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Feb 3, 2025
1 parent 41e9533 commit 7b197cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.python.pydev.core.ModulesKey;
import org.python.pydev.core.docutils.PySelection;
import org.python.pydev.core.log.Log;
import org.python.pydev.core.preferences.InterpreterGeneralPreferences;
import org.python.pydev.parser.jython.SimpleNode;
import org.python.pydev.plugin.nature.PythonNature;
import org.python.pydev.shared_core.io.FileUtils;
Expand Down Expand Up @@ -67,7 +68,7 @@ public void setUp() throws Exception {
baseDir2.mkdirs();
}
super.setUp();

InterpreterGeneralPreferences.FORCE_USE_TYPESHED = true;
}

@Override
Expand Down Expand Up @@ -134,6 +135,7 @@ public void tearDown() throws Exception {
FileUtils.deleteDirectoryTree(baseDir2);

super.tearDown();
InterpreterGeneralPreferences.FORCE_USE_TYPESHED = null;
}

public void testFindHierarchy() throws Throwable {
Expand All @@ -154,7 +156,7 @@ public void testFindHierarchy() throws Throwable {
assertEquals("Bar", node.name);
assertTrue(node.moduleName.startsWith("foo"));

assertIsIn("Pickler", "pickle", node.parents);
assertIsIn("Pickler", "_pickle", node.parents);
assertIsIn("Foo", node.moduleName, node.children);
} finally {
// System.out.println("END ------------");
Expand All @@ -177,7 +179,7 @@ public void testFindHierarchy2() {
assertTrue(node.moduleName.startsWith("foo"));

HierarchyNodeModel model = assertIsIn("Bar", node.moduleName, node.parents);
assertIsIn("Pickler", "pickle", model.parents);
assertIsIn("Pickler", "_pickle", model.parents);

}

Expand All @@ -201,7 +203,7 @@ public void testFindHierarchy3() {
assertTrue(node.moduleName.startsWith("foo"));

assertIsIn("Bar", node.moduleName, node.parents);
assertIsIn("Pickler", "pickle", node.parents);
assertIsIn("Pickler", "_pickle", node.parents);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public void tearDown() throws Exception {
CorePlugin.setBundleInfo(null);
ProjectModulesManager.IN_TESTS = false;
FileUtils.IN_TESTS = false;
InterpreterGeneralPreferences.FORCE_USE_TYPESHED = null;
super.tearDown();
}

Expand Down

0 comments on commit 7b197cd

Please sign in to comment.