Add test for empty input

This commit is contained in:
Alexey 2018-08-08 12:25:51 +02:00
parent 5d0fdd296a
commit ad8d07f5e5

View file

@ -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());
}
}