Skip to content

Commit

Permalink
Test: Use tosfs to replace tos client
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghua committed Sep 19, 2024
1 parent e9da1a4 commit d188d88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tosfs/tests/test_tosfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def test_file_write_encdec(
with tosfs.open(f"{bucket}/{temporary_workspace}/{file_name}", "wb") as f:
f.write(content.encode("gbk"))
with tosfs.open(
f"{bucket}/{temporary_workspace}/{file_name}", "rb", encoding="gbk"
f"{bucket}/{temporary_workspace}/{file_name}", "r", encoding="gbk"
) as f:
assert f.read() == content

Expand All @@ -695,7 +695,7 @@ def test_file_write_encdec(
with tosfs.open(f"{bucket}/{temporary_workspace}/{file_name}", "wb") as f:
f.write(content.encode("utf-16-le"))
with tosfs.open(
f"{bucket}/{temporary_workspace}/{file_name}", "rb", encoding="utf-16-le"
f"{bucket}/{temporary_workspace}/{file_name}", "r", encoding="utf-16-le"
) as f:
assert f.read() == content

Expand Down

0 comments on commit d188d88

Please sign in to comment.