Skip to content

Commit

Permalink
fix: test copy file considering random order of ls contents
Browse files Browse the repository at this point in the history
  • Loading branch information
hlouzada committed Jan 23, 2025
1 parent ab22af6 commit 257d314
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spyder/plugins/remoteclient/tests/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ async def test_copy_file(
async with file_api_class() as file_api:
ls_content = await file_api.ls(self.remote_temp_dir)
assert len(ls_content) == 2
assert ls_content[0]["name"] == self.remote_temp_dir + "/test.txt"
assert ls_content[1]["name"] == self.remote_temp_dir + "/test2.txt"
idx = [
item["name"] for item in ls_content
].index(self.remote_temp_dir + "/test.txt")
assert ls_content[not idx]["name"] == self.remote_temp_dir + "/test2.txt"
assert ls_content[0]["size"] == ls_content[1]["size"]

@AsyncDispatcher.dispatch(early_return=False)
Expand Down

0 comments on commit 257d314

Please sign in to comment.