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
4f8b8ff1
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "229fd8cbca989b675ed9ad30676b323eebc24fbc"
Unverified
Commit
4f8b8ff1
authored
Aug 28, 2019
by
Francisco Massa
Committed by
GitHub
Aug 28, 2019
Browse files
Disable download tests for Python2 (#1269)
parent
20844b5b
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 @
4f8b8ff1
...
@@ -7,6 +7,7 @@ import zipfile
...
@@ -7,6 +7,7 @@ import zipfile
import
tarfile
import
tarfile
import
gzip
import
gzip
import
warnings
import
warnings
from
torch._six
import
PY2
from
torch._utils_internal
import
get_file_path_2
from
torch._utils_internal
import
get_file_path_2
from
common_utils
import
get_tmp_dir
from
common_utils
import
get_tmp_dir
...
@@ -40,6 +41,7 @@ class Tester(unittest.TestCase):
...
@@ -40,6 +41,7 @@ class Tester(unittest.TestCase):
self
.
assertTrue
(
utils
.
check_integrity
(
existing_fpath
))
self
.
assertTrue
(
utils
.
check_integrity
(
existing_fpath
))
self
.
assertFalse
(
utils
.
check_integrity
(
nonexisting_fpath
))
self
.
assertFalse
(
utils
.
check_integrity
(
nonexisting_fpath
))
@
unittest
.
skipIf
(
PY2
,
"https://github.com/pytorch/vision/issues/1268"
)
def
test_download_url
(
self
):
def
test_download_url
(
self
):
with
get_tmp_dir
()
as
temp_dir
:
with
get_tmp_dir
()
as
temp_dir
:
url
=
"http://github.com/pytorch/vision/archive/master.zip"
url
=
"http://github.com/pytorch/vision/archive/master.zip"
...
@@ -51,6 +53,7 @@ class Tester(unittest.TestCase):
...
@@ -51,6 +53,7 @@ class Tester(unittest.TestCase):
warnings
.
warn
(
msg
,
RuntimeWarning
)
warnings
.
warn
(
msg
,
RuntimeWarning
)
raise
unittest
.
SkipTest
(
msg
)
raise
unittest
.
SkipTest
(
msg
)
@
unittest
.
skipIf
(
PY2
,
"https://github.com/pytorch/vision/issues/1268"
)
def
test_download_url_retry_http
(
self
):
def
test_download_url_retry_http
(
self
):
with
get_tmp_dir
()
as
temp_dir
:
with
get_tmp_dir
()
as
temp_dir
:
url
=
"https://github.com/pytorch/vision/archive/master.zip"
url
=
"https://github.com/pytorch/vision/archive/master.zip"
...
...
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