Skip to content

Commit 125ac79

Browse files
ctruedenclaude
andcommitted
Silence expected NoSuchType warnings in tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 794e1f1 commit 125ac79

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎src/test/java/org/scijava/plugins/scripting/jython/completion/JythonDialectTest.java‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
import org.python.jsr223.PyScriptEngineFactory;
4949
import org.scijava.lsp.ScriptDialect.Header;
5050
import org.scijava.lsp.ScriptSession;
51+
import org.scijava.log.LogLevel;
52+
import org.scijava.log.LogService;
5153
import org.scijava.script.ScriptLanguage;
5254
import org.scijava.script.ScriptService;
5355

@@ -99,6 +101,9 @@ public void testParameterType() {
99101

100102
@Test
101103
public void testScriptParameters() {
104+
// Note: NoSuchType is deliberately unresolvable; silence the resulting
105+
// warnings (with stack traces) that the parameter parser logs for it.
106+
context.service(LogService.class).setLevel(LogLevel.ERROR);
102107
final String scijavaScriptPrefix = //
103108
"#@ String (label=\"Please enter your name\") name\n" + //
104109
"#@output String greeting\n" + //
@@ -123,7 +128,8 @@ public void testScriptParameters() {
123128
// Modules imported only to declare those are not completed.
124129
// TODO: Also check "j" (for java), once scijava-lsp ignores #@ lines
125130
// when deciding whether the script mentions a name.
126-
assertFalse(complete(scijavaScriptPrefix + "arr").contains("array")); }
131+
assertFalse(complete(scijavaScriptPrefix + "arr").contains("array"));
132+
}
127133

128134

129135
/**

0 commit comments

Comments
 (0)