datafu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject [datafu] 02/02: rename example_tests
Date Wed, 15 May 2019 14:13:37 GMT
This is an automated email from the ASF dual-hosted git repository.

eyal pushed a commit to branch spark-tmp
in repository https://gitbox.apache.org/repos/asf/datafu.git

commit a410e1c41820e89f92a6a4ea04cae4408a10f787
Author: oraviv <oraviv@paypal.com>
AuthorDate: Wed May 15 13:46:22 2019 +0300

    rename example_tests
---
 .../resources/{example_tests => python_tests}/df_utils_tests.py   | 0
 .../test/resources/{example_tests => python_tests}/pyfromscala.py | 2 +-
 .../{example_tests => python_tests}/pyfromscala_with_error.py     | 0
 .../src/test/scala/datafu/spark/TestScalaPythonBridge.scala       | 8 ++++----
 datafu-spark/src/test/scala/datafu/spark/TestSparkDFUtils.scala   | 2 +-
 datafu-spark/src/test/scala/datafu/spark/TestSparkUDAFs.scala     | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/datafu-spark/src/test/resources/example_tests/df_utils_tests.py b/datafu-spark/src/test/resources/python_tests/df_utils_tests.py
similarity index 100%
rename from datafu-spark/src/test/resources/example_tests/df_utils_tests.py
rename to datafu-spark/src/test/resources/python_tests/df_utils_tests.py
diff --git a/datafu-spark/src/test/resources/example_tests/pyfromscala.py b/datafu-spark/src/test/resources/python_tests/pyfromscala.py
similarity index 98%
rename from datafu-spark/src/test/resources/example_tests/pyfromscala.py
rename to datafu-spark/src/test/resources/python_tests/pyfromscala.py
index 040854b..73939b6 100644
--- a/datafu-spark/src/test/resources/example_tests/pyfromscala.py
+++ b/datafu-spark/src/test/resources/python_tests/pyfromscala.py
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-# Some usage exmaples of python-Scala functionality
+# Some usage examples of python-Scala functionality
 
 # print the PYTHONPATH
 import sys
diff --git a/datafu-spark/src/test/resources/example_tests/pyfromscala_with_error.py b/datafu-spark/src/test/resources/python_tests/pyfromscala_with_error.py
similarity index 100%
rename from datafu-spark/src/test/resources/example_tests/pyfromscala_with_error.py
rename to datafu-spark/src/test/resources/python_tests/pyfromscala_with_error.py
diff --git a/datafu-spark/src/test/scala/datafu/spark/TestScalaPythonBridge.scala b/datafu-spark/src/test/scala/datafu/spark/TestScalaPythonBridge.scala
index 1408e2c..2781561 100644
--- a/datafu-spark/src/test/scala/datafu/spark/TestScalaPythonBridge.scala
+++ b/datafu-spark/src/test/scala/datafu/spark/TestScalaPythonBridge.scala
@@ -83,7 +83,7 @@ class TestScalaPythonBridge extends FunSuite {
     val dfin = spark.sparkContext.parallelize(1 to 10).toDF("num")
     dfin.createOrReplaceTempView("dfin")
 
-    runner.runPythonFile("example_tests/pyfromscala.py")
+    runner.runPythonFile("python_tests/pyfromscala.py")
 
     // try to invoke python udf from scala code
     assert(
@@ -100,13 +100,13 @@ class TestScalaPythonBridge extends FunSuite {
   }
 
   test("pyfromscala_with_error.py") {
-    val t = Try(runner.runPythonFile("example_tests/pyfromscala_with_error.py"))
+    val t = Try(runner.runPythonFile("python_tests/pyfromscala_with_error.py"))
     assert(t.isFailure)
     assert(t.failed.get.isInstanceOf[RuntimeException])
   }
 
   test("SparkDFUtilsBridge") {
-    runner.runPythonFile("example_tests/df_utils_tests.py")
+    runner.runPythonFile("python_tests/df_utils_tests.py")
     assertTable("dedup", "[a,Alice,34], [b,Bob,36], [c,Zoey,36]")
     assertTable(
       "dedupTopN",
@@ -126,4 +126,4 @@ class TestScalaPythonBridge extends FunSuite {
 
 }
 
-class ExampleFiles extends PythonResource("example_tests")
+class ExampleFiles extends PythonResource("python_tests")
diff --git a/datafu-spark/src/test/scala/datafu/spark/TestSparkDFUtils.scala b/datafu-spark/src/test/scala/datafu/spark/TestSparkDFUtils.scala
index 8c7453e..045b75b 100644
--- a/datafu-spark/src/test/scala/datafu/spark/TestSparkDFUtils.scala
+++ b/datafu-spark/src/test/scala/datafu/spark/TestSparkDFUtils.scala
@@ -111,7 +111,7 @@ class DataFrameOpsTests extends FunSuite with DataFrameSuiteBase {
     assertDataFrameEquals(expectedComplex, actual)
   }
 
-  case class Inner(colGrp: String, colOrd: Int)
+  case class Inner(col_grp: String, col_ord: Int)
 
   case class expComplex(
                          col_grp: String,
diff --git a/datafu-spark/src/test/scala/datafu/spark/TestSparkUDAFs.scala b/datafu-spark/src/test/scala/datafu/spark/TestSparkUDAFs.scala
index 6fe906c..8df9fba 100644
--- a/datafu-spark/src/test/scala/datafu/spark/TestSparkUDAFs.scala
+++ b/datafu-spark/src/test/scala/datafu/spark/TestSparkUDAFs.scala
@@ -213,7 +213,7 @@ class UdafTests extends FunSuite with DataFrameSuiteBase {
     )
   }
 
-  case class Exp5(colGrp: String, colOrd: Option[Int])
+  case class Exp5(col_grp: String, col_ord: Option[Int])
 
   test("countDistinctUpTo") {
     import datafu.spark.SparkUDAFs.CountDistinctUpTo


Mime
View raw message