chore: improve opendal storage and ensure closing file after reading files in load_stream method (#25874)

This commit is contained in:
Bowen Liang
2025-09-18 14:09:19 +08:00
committed by GitHub
parent 87aa070486
commit b2e4107c17
5 changed files with 40 additions and 28 deletions

View File

@@ -21,8 +21,11 @@ def get_example_filename() -> str:
return "test.txt"
def get_example_data() -> bytes:
return b"test"
def get_example_data(length: int = 4) -> bytes:
chars = "test"
result = "".join(chars[i % len(chars)] for i in range(length)).encode()
assert len(result) == length
return result
def get_example_filepath() -> str: