Skip to content

Commit eabbebb

Browse files
author
Tom McCormick
committed
pr comments
1 parent 57518ef commit eabbebb

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

tests/io/test_pyarrow.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2640,32 +2640,26 @@ def test_retry_strategy_not_found() -> None:
26402640
io.new_input("s3://bucket/path/to/file")
26412641

26422642

2643-
def test_parse_location_environment_defaults() -> None:
2644-
"""Test that parse_location uses environment variables for defaults."""
2643+
def test_parse_location_defaults() -> None:
2644+
"""Test that parse_location uses defaults."""
26452645

26462646
from pyiceberg.io.pyarrow import PyArrowFileIO
26472647

2648-
# Test with default environment (no env vars set)
26492648
scheme, netloc, path = PyArrowFileIO.parse_location("/foo/bar")
26502649
assert scheme == "file"
26512650
assert netloc == ""
26522651
assert path == "/foo/bar"
26532652

2654-
# Test with properties set
2655-
properties = {}
2656-
properties["DEFAULT_SCHEME"] = "scheme"
2657-
properties["DEFAULT_NETLOC"] = "netloc:8000"
2658-
2659-
scheme, netloc, path = PyArrowFileIO.parse_location("/foo/bar", properties=properties)
2653+
scheme, netloc, path = PyArrowFileIO.parse_location(
2654+
"/foo/bar", properties={"DEFAULT_SCHEME": "scheme", "DEFAULT_NETLOC": "netloc:8000"}
2655+
)
26602656
assert scheme == "scheme"
26612657
assert netloc == "netloc:8000"
26622658
assert path == "netloc:8000/foo/bar"
26632659

2664-
# Set properties
2665-
properties["DEFAULT_SCHEME"] = "hdfs"
2666-
properties["DEFAULT_NETLOC"] = "netloc:8000"
2667-
2668-
scheme, netloc, path = PyArrowFileIO.parse_location("/foo/bar", properties=properties)
2660+
scheme, netloc, path = PyArrowFileIO.parse_location(
2661+
"/foo/bar", properties={"DEFAULT_SCHEME": "hdfs", "DEFAULT_NETLOC": "netloc:8000"}
2662+
)
26692663
assert scheme == "hdfs"
26702664
assert netloc == "netloc:8000"
26712665
assert path == "/foo/bar"

0 commit comments

Comments
 (0)