uranusjr commented on code in PR #37524:
URL: https://github.com/apache/airflow/pull/37524#discussion_r1494022774


##########
tests/io/test_path.py:
##########
@@ -60,34 +89,39 @@ def get_fs_no_storage_options(_: str):
 class TestFs:
     def setup_class(self):
         self._store_cache = _STORE_CACHE.copy()
+        self._fsspec_registry = _fsspec_registry.copy()
+        for protocol in FakeRemoteFileSystem.protocol:
+            register_implementation(protocol, FakeRemoteFileSystem, 
clobber=True)
 
     def teardown(self):
         _STORE_CACHE.clear()
         _STORE_CACHE.update(self._store_cache)
+        _fsspec_registry.clear()
+        _fsspec_registry.update(self._fsspec_registry)
 
     def test_alias(self):
         store = attach("file", alias="local")
         assert isinstance(store.fs, LocalFileSystem)
         assert "local" in _STORE_CACHE
 
     def test_init_objectstoragepath(self):
-        path = ObjectStoragePath("file://bucket/key/part1/part2")
-        assert path.bucket == "bucket"
+        path = ObjectStoragePath("file:///key/part1/part2")
+        assert path.bucket == ""

Review Comment:
   These tests (not just this) need to ensure the bucket (netloc) part of the 
URL is correctly parsed. If `file:` can’t do the job, we need to use another 
protocol in these tests.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to