Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
6c77fdf6
"git@developer.sourcefind.cn:change/sglang.git" did not exist on "56f5fc4ab5e1d9e270dcdab5f1d6f67e6785eebe"
Commit
6c77fdf6
authored
Apr 09, 2019
by
Ashok M
Committed by
Francisco Massa
Apr 09, 2019
Browse files
Test - Added downloaded directory not empty check in test_datasets_utils (#844)
parent
144ca427
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
test/test_datasets_utils.py
test/test_datasets_utils.py
+3
-0
No files found.
test/test_datasets_utils.py
View file @
6c77fdf6
import
os
import
shutil
import
tempfile
import
torch
...
...
@@ -11,12 +12,14 @@ class Tester(unittest.TestCase):
temp_dir
=
tempfile
.
mkdtemp
()
url
=
"http://github.com/pytorch/vision/archive/master.zip"
utils
.
download_url
(
url
,
temp_dir
)
assert
not
len
(
os
.
listdir
(
temp_dir
))
==
0
,
'The downloaded root directory is empty after download.'
shutil
.
rmtree
(
temp_dir
)
def
test_download_url_retry_http
(
self
):
temp_dir
=
tempfile
.
mkdtemp
()
url
=
"https://github.com/pytorch/vision/archive/master.zip"
utils
.
download_url
(
url
,
temp_dir
)
assert
not
len
(
os
.
listdir
(
temp_dir
))
==
0
,
'The downloaded root directory is empty after download.'
shutil
.
rmtree
(
temp_dir
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment