@@ -192,6 +192,7 @@ def test_filepaths():
192192 "toplevel/subdir1/test4.txt" ,
193193 "toplevel/subdir1/subdir2/test5.txt" ,
194194 "toplevel/subdir1/subdir2/test6.txt" ,
195+ "toplevel/subdir1/subdir2/file name.txt"
195196 ]
196197 yield filepaths
197198
@@ -202,7 +203,7 @@ def populated_device(device, test_filepaths):
202203
203204 device .shell (f"mkdir -p /data/local/tmp/{ dirpath } " )
204205 for path in test_filepaths :
205- device .shell (f"echo { path } > /data/local/tmp/{ path } " )
206+ device .shell (f"echo \" { path } \" > \" /data/local/tmp/{ path } \" " )
206207
207208 yield device
208209
@@ -214,7 +215,6 @@ def working_dir():
214215 with tempfile .TemporaryDirectory () as f :
215216 yield pathlib .Path (f )
216217
217-
218218def test_pull_file (populated_device , working_dir ):
219219 populated_device .pull (
220220 "/data/local/tmp/toplevel/test1.txt" , working_dir / "test1.txt"
@@ -223,6 +223,13 @@ def test_pull_file(populated_device, working_dir):
223223 assert dest_path .is_file ()
224224 assert dest_path .read_text () == "toplevel/test1.txt\n "
225225
226+ def test_pull_file_with_space (populated_device , working_dir ):
227+ dest_path = working_dir / "file name.txt"
228+ populated_device .pull (
229+ "/data/local/tmp/toplevel/subdir1/subdir2/file name.txt" , dest_path
230+ )
231+ assert dest_path .is_file ()
232+ assert dest_path .read_text () == "toplevel/subdir1/subdir2/file name.txt"
226233
227234def test_pull_dir (populated_device , working_dir ):
228235 populated_device .pull (
0 commit comments