From 01026ec5735a781371df58783cb454334783ca56 Mon Sep 17 00:00:00 2001 From: yanghua Date: Thu, 14 Nov 2024 14:23:26 +0800 Subject: [PATCH] Add more test cases about fsspec integration --- tosfs/tests/test_fsspec_integration.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tosfs/tests/test_fsspec_integration.py b/tosfs/tests/test_fsspec_integration.py index 0960316..536b33c 100644 --- a/tosfs/tests/test_fsspec_integration.py +++ b/tosfs/tests/test_fsspec_integration.py @@ -19,7 +19,6 @@ from tos import EnvCredentialsProvider from tosfs import TosFileSystem -from tosfs.core import logger from tosfs.utils import random_str @@ -74,11 +73,8 @@ def test_fsspec_open(bucket, temporary_workspace): class MyTosFileSystem(TosFileSystem): """A sub class of TosFileSystem.""" - protocol = ("tos",) - def __init__(self): """Init MyTosFileSystem.""" - logger.error("+++++++++++++++++") super().__init__( endpoint_url=os.environ.get("TOS_ENDPOINT"), region=os.environ.get("TOS_REGION"), @@ -87,18 +83,7 @@ def __init__(self): def test_customized_class(bucket, temporary_workspace): - # known_implementations["tos"] = { - # "class": "tosfs.tests.test_fsspec_integration.MyTosFileSystem" - # } fsspec.register_implementation("tos", MyTosFileSystem, True) - # fsspec._registry = "tosfs.tests.test_fsspec_integration.MyTosFileSystem" - - logger.error("----------------") - logger.error("tos" in fsspec.registry) - logger.error(f"fsspec.registry {fsspec.registry}") - logger.error(known_implementations) - logger.error(known_implementations["tos"]) - logger.error(fsspec.get_filesystem_class("tos")) file = f"{random_str()}.txt" content = "Hello TOSFS."