aboutsummaryrefslogtreecommitdiff
path: root/python/test_support
diff options
context:
space:
mode:
authorDavies Liu <davies.liu@gmail.com>2014-09-24 12:10:09 -0700
committerJosh Rosen <joshrosen@apache.org>2014-09-24 12:10:09 -0700
commitc854b9fcb5595b1d70b6ce257fc7574602ac5e49 (patch)
tree87a169effcaeb4abc13324f4d13dada8cd533a88 /python/test_support
parent50f863365348d52a9285fc779efbedbf1567ea11 (diff)
downloadspark-c854b9fcb5595b1d70b6ce257fc7574602ac5e49.tar.gz
spark-c854b9fcb5595b1d70b6ce257fc7574602ac5e49.tar.bz2
spark-c854b9fcb5595b1d70b6ce257fc7574602ac5e49.zip
[SPARK-3634] [PySpark] User's module should take precedence over system modules
Python modules added through addPyFile should take precedence over system modules. This patch put the path for user added module in the front of sys.path (just after ''). Author: Davies Liu <davies.liu@gmail.com> Closes #2492 from davies/path and squashes the following commits: 4a2af78 [Davies Liu] fix tests f7ff4da [Davies Liu] ad license header 6b0002f [Davies Liu] add tests c16c392 [Davies Liu] put addPyFile in front of sys.path
Diffstat (limited to 'python/test_support')
-rw-r--r--python/test_support/SimpleHTTPServer.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/python/test_support/SimpleHTTPServer.py b/python/test_support/SimpleHTTPServer.py
new file mode 100644
index 0000000000..eddbd588e0
--- /dev/null
+++ b/python/test_support/SimpleHTTPServer.py
@@ -0,0 +1,22 @@
+#
+# 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.
+#
+
+"""
+Used to test override standard SimpleHTTPServer module.
+"""
+
+__name__ = "My Server"