@@ -192,7 +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"
195+ "toplevel/subdir1/subdir2/file name.txt" ,
196196 ]
197197 yield filepaths
198198
@@ -203,7 +203,7 @@ def populated_device(device, test_filepaths):
203203
204204 device .shell (f"mkdir -p /data/local/tmp/{ dirpath } " )
205205 for path in test_filepaths :
206- device .shell (f" echo \ "{ path } \ " > \ " /data/local/tmp/{ path } \" " )
206+ device .shell (f' echo "{ path } " > "/data/local/tmp/{ path } "' )
207207
208208 yield device
209209
@@ -215,6 +215,7 @@ def working_dir():
215215 with tempfile .TemporaryDirectory () as f :
216216 yield pathlib .Path (f )
217217
218+
218219def test_pull_file (populated_device , working_dir ):
219220 populated_device .pull (
220221 "/data/local/tmp/toplevel/test1.txt" , working_dir / "test1.txt"
@@ -223,13 +224,15 @@ def test_pull_file(populated_device, working_dir):
223224 assert dest_path .is_file ()
224225 assert dest_path .read_text () == "toplevel/test1.txt\n "
225226
227+
226228def test_pull_file_with_space (populated_device , working_dir ):
227229 dest_path = working_dir / "file name.txt"
228230 populated_device .pull (
229- "/data/local/tmp/toplevel/subdir1/subdir2/file name.txt" , dest_path
231+ "/data/local/tmp/toplevel/subdir1/subdir2/file name.txt" , dest_path
230232 )
231233 assert dest_path .is_file ()
232- assert dest_path .read_text () == "toplevel/subdir1/subdir2/file name.txt"
234+ assert dest_path .read_text () == "toplevel/subdir1/subdir2/file name.txt\n "
235+
233236
234237def test_pull_dir (populated_device , working_dir ):
235238 populated_device .pull (
0 commit comments