Repository: zeppelin Updated Branches: refs/heads/branch-0.6 4386cda31 -> 2ce13357d
[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 (cherry picked from commit df7dd5c373b84625d14a5fc2791f9924ee9d102f) Signed-off-by: Lee moon soo <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/2ce13357 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/2ce13357 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/2ce13357 Branch: refs/heads/branch-0.6 Commit: 2ce13357d416f96eb1e9f2c69135e3790200befd Parents: 4386cda 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:59 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/2ce13357/docs/interpreter/python.md ---------------------------------------------------------------------- diff --git a/docs/interpreter/python.md b/docs/interpreter/python.md index 619fe3f..997af14 100644 --- a/docs/interpreter/python.md +++ b/docs/interpreter/python.md @@ -78,7 +78,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/2ce13357/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/2ce13357/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 30a65e9..35f4e2b 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")); } @@ -142,8 +142,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"));
