This is an automated email from the ASF dual-hosted git repository.

areeve pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 8fcab2f0e5 GH-48402: [Python] Enable the relative path in 
test_write_dataset (#48403)
8fcab2f0e5 is described below

commit 8fcab2f0e59e5897965f890d6ddae02e30c3e121
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Tue Dec 16 10:30:54 2025 +0900

    GH-48402: [Python] Enable the relative path in test_write_dataset (#48403)
    
    ### Rationale for this change
    
    Enable a test that is intended so.
    
    ### What changes are included in this PR?
    
    This PR proposes to enable the relative path in `test_write_dataset` with 
`pyarrow.tests.util.change_cwd`.
    
    ### Are these changes tested?
    
    Manually tested with `pytest -k "test_write_dataset"`
    
    ### Are there any user-facing changes?
    
    No, test-only.
    
    * GitHub Issue: #48402
    
    Authored-by: Hyukjin Kwon <[email protected]>
    Signed-off-by: Adam Reeve <[email protected]>
---
 python/pyarrow/tests/test_dataset.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/python/pyarrow/tests/test_dataset.py 
b/python/pyarrow/tests/test_dataset.py
index e30a484f90..d00c0c4b3e 100644
--- a/python/pyarrow/tests/test_dataset.py
+++ b/python/pyarrow/tests/test_dataset.py
@@ -4232,12 +4232,12 @@ def test_write_dataset(tempdir):
     expected_files = [target / "part-0.arrow"]
     _check_dataset_roundtrip(dataset, target, expected_files, 'a', target)
 
-    # TODO
-    # # relative path
-    # target = tempdir / 'single-file-target3'
-    # expected_files = [target / "part-0.ipc"]
-    # _check_dataset_roundtrip(
-    #     dataset, './single-file-target3', expected_files, target)
+    # relative path
+    target = tempdir / 'single-file-target3'
+    expected_files = [target / "part-0.arrow"]
+    with change_cwd(tempdir):
+        _check_dataset_roundtrip(
+            dataset, './single-file-target3', expected_files, 'a', target)
 
     # Directory of files
     directory = tempdir / 'single-directory'

Reply via email to