Github user BryanCutler commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15140#discussion_r79454288
  
    --- Diff: python/pyspark/tests.py ---
    @@ -409,13 +409,22 @@ def func(x):
             self.assertEqual("Hello World!", res)
     
         def test_add_file_locally(self):
    -        path = os.path.join(SPARK_HOME, "python/test_support/hello.txt")
    +        path = os.path.join(SPARK_HOME, 
"python/test_support/hello/hello.txt")
             self.sc.addFile(path)
             download_path = SparkFiles.get("hello.txt")
             self.assertNotEqual(path, download_path)
             with open(download_path) as test_file:
                 self.assertEqual("Hello World!\n", test_file.readline())
     
    +        path = os.path.join(SPARK_HOME, "python/test_support/hello")
    +        self.sc.addFile(path, True)
    +        download_path = SparkFiles.get("hello")
    +        self.assertNotEqual(path, download_path)
    +        with open(download_path + "/hello.txt") as test_file:
    +            self.assertEqual("Hello World!\n", test_file.readline())
    +        with open(download_path + "/sub_hello/sub_hello.txt") as test_file:
    +            self.assertEqual("Sub Hello World!\n", test_file.readline())
    +
    --- End diff --
    
    minor:  maybe the above block should be in a separate test like `def 
test_add_file_locally_recursive`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to