mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Add test for empty input
This commit is contained in:
parent
5d0fdd296a
commit
ad8d07f5e5
1 changed files with 11 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ import org.apache.zeppelin.interpreter.LazyOpenInterpreter;
|
|||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Properties;
|
||||
import java.util.regex.Matcher;
|
||||
|
|
@ -105,4 +106,14 @@ public class PythonInterpreterTest extends BasePythonInterpreterTest {
|
|||
t.join(2000);
|
||||
assertFalse(t.isAlive());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOnlyCommentsJob() throws InterpreterException {
|
||||
final String code = "# print('hello')";
|
||||
InterpreterResult ret = interpreter.interpret(code, getInterpreterContext());
|
||||
|
||||
assertNotNull(ret);
|
||||
assertEquals(InterpreterResult.Code.SUCCESS, ret.code());
|
||||
assertEquals(Collections.emptyList(), ret.message());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue