chore: improve opendal storage and ensure closing file after reading files in load_stream method (#25874)
This commit is contained in:
parent
87aa070486
commit
b2e4107c17
5 changed files with 40 additions and 28 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue