Skip to content

Commit 696c4ca

Browse files
committed
use non-overlapping osfs urls
1 parent 44cbe31 commit 696c4ca

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/test_move.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,17 @@ def test_move_file_fs_urls(self):
104104
# create a temp dir to work on
105105
with open_fs("temp://") as tmp:
106106
path = tmp.getsyspath("/")
107-
tmp.writetext("file.txt", "Content")
108-
tmp.makedir("subdir")
107+
subdir_src = tmp.makedir("subdir_src")
108+
subdir_src.writetext("file.txt", "Content")
109+
tmp.makedir("subdir_dst")
109110
fs.move.move_file(
110-
"osfs://" + path,
111+
"osfs://" + join(path, "subdir_src"),
111112
"file.txt",
112-
"osfs://" + join(path, "subdir"),
113+
"osfs://" + join(path, "subdir_dst"),
113114
"file.txt",
114115
)
115-
self.assertFalse(tmp.exists("file.txt"))
116-
self.assertEqual(tmp.readtext("subdir/file.txt"), "Content")
116+
self.assertFalse(subdir_src.exists("file.txt"))
117+
self.assertEqual(tmp.readtext("subdir_dst/file.txt"), "Content")
117118

118119
def test_move_file_same_fs_read_only_source(self):
119120
with open_fs("temp://") as tmp:

0 commit comments

Comments
 (0)