We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 144ca42 commit 6c77fdfCopy full SHA for 6c77fdf
test/test_datasets_utils.py
@@ -1,3 +1,4 @@
1
+import os
2
import shutil
3
import tempfile
4
import torch
@@ -11,12 +12,14 @@ def test_download_url(self):
11
12
temp_dir = tempfile.mkdtemp()
13
url = "http://github.com/pytorch/vision/archive/master.zip"
14
utils.download_url(url, temp_dir)
15
+ assert not len(os.listdir(temp_dir)) == 0, 'The downloaded root directory is empty after download.'
16
shutil.rmtree(temp_dir)
17
18
def test_download_url_retry_http(self):
19
20
url = "https://github.com/pytorch/vision/archive/master.zip"
21
22
23
24
25
0 commit comments