@@ -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