Repository: zeppelin Updated Branches: refs/heads/master d77991371 -> df7dd5c37
[HOTFXI] Fix python test case and resolve rat license issue ### What is this PR for? Update `testPy4jIsNotInstalled `, `testPy4jIsInstalled` test - `z.show` -> `def show` to check `show` function is defined - check if `bootstrap_input.py` excuted by checking `z = Py4jZeppelinContext` instead of `z = PyZeppelinContext` - add license header in `__init__.py` file ### What type of PR is it? Hot Fix Author: Mina Lee <[email protected]> Closes #1075 from minahlee/adjustPythonTest and squashes the following commits: d46c5e1 [Mina Lee] Update api name in docs 6d82e9f [Mina Lee] Add license to __init__.py f66e9dc [Mina Lee] Fix python test case Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/df7dd5c3 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/df7dd5c3 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/df7dd5c3 Branch: refs/heads/master Commit: df7dd5c373b84625d14a5fc2791f9924ee9d102f Parents: d779913 Author: Mina Lee <[email protected]> Authored: Thu Jun 23 15:22:41 2016 -0700 Committer: Lee moon soo <[email protected]> Committed: Thu Jun 23 18:43:49 2016 -0700 ---------------------------------------------------------------------- docs/interpreter/python.md | 2 +- python/src/main/resources/__init__.py | 14 ++++++++++++++ .../apache/zeppelin/python/PythonInterpreterTest.java | 6 +++--- 3 files changed, 18 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/df7dd5c3/docs/interpreter/python.md ---------------------------------------------------------------------- diff --git a/docs/interpreter/python.md b/docs/interpreter/python.md index 822488f..b34b089 100644 --- a/docs/interpreter/python.md +++ b/docs/interpreter/python.md @@ -83,7 +83,7 @@ plt.figure() z.show(plt) plt.close() ``` -zeppelin_show function can take optional parameters to adapt graph width and height +z.show function can take optional parameters to adapt graph width and height ```python %python http://git-wip-us.apache.org/repos/asf/zeppelin/blob/df7dd5c3/python/src/main/resources/__init__.py ---------------------------------------------------------------------- diff --git a/python/src/main/resources/__init__.py b/python/src/main/resources/__init__.py index e69de29..ec20143 100644 --- a/python/src/main/resources/__init__.py +++ b/python/src/main/resources/__init__.py @@ -0,0 +1,14 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. http://git-wip-us.apache.org/repos/asf/zeppelin/blob/df7dd5c3/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java ---------------------------------------------------------------------- diff --git a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java index c0bc293..2e8060d 100644 --- a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java +++ b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java @@ -116,7 +116,7 @@ public class PythonInterpreterTest { assertTrue(cmdHistory.contains("def help()")); assertTrue(cmdHistory.contains("class PyZeppelinContext(object):")); assertTrue(cmdHistory.contains("z = PyZeppelinContext")); - assertTrue(cmdHistory.contains("z.show")); + assertTrue(cmdHistory.contains("def show")); assertFalse(cmdHistory.contains("GatewayClient")); } @@ -141,8 +141,8 @@ public class PythonInterpreterTest { assertTrue(cmdHistory.contains("def help()")); assertTrue(cmdHistory.contains("class PyZeppelinContext(object):")); - assertTrue(cmdHistory.contains("z = PyZeppelinContext")); - assertTrue(cmdHistory.contains("z.show")); + assertTrue(cmdHistory.contains("z = Py4jZeppelinContext")); + assertTrue(cmdHistory.contains("def show")); assertTrue(cmdHistory.contains("GatewayClient(port=" + py4jPort + ")")); assertTrue(cmdHistory.contains("org.apache.zeppelin.display.Input"));
