Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
leezu committed Jul 9, 2018
1 parent a0bcf1e commit 8257e0a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/python/unittest/test_gluon_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,12 @@ def test_download_successful():
tmpfile = os.path.join(tmp, 'README.md')
mx.gluon.utils.download("https://github.com/raw/apache/incubator-mxnet/master/README.md",
path=tmpfile)
assert os.path.getsize(tmpfile) > 100
assert os.path.getsize(tmpfile) > 100

def test_download_ssl_verify():
with warnings.catch_warnings(record=True) as warnings_:
mx.gluon.utils.download(
"https://mxnet.incubator.apache.org/", verify_ssl=False)
assert any(
str(w.message[0]).startswith('Unverified HTTPS request')
for w in warnings_)

0 comments on commit 8257e0a

Please sign in to comment.