summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHind-M <hind.montassif@gmail.com>2022-02-02 16:14:17 +0100
committerHind-M <hind.montassif@gmail.com>2022-02-02 16:14:17 +0100
commit19689c712a1f5945e664f9c74c14b6994e7afaaf (patch)
treeffbfd2f0b993e9b576213a1df60725e5f523d2fc
parent741f4f182479d1e5e78e9eb9180adce0a72e99b6 (diff)
Try to fix failing test in windows
-rw-r--r--src/python/test/test_remote_datasets.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/python/test/test_remote_datasets.py b/src/python/test/test_remote_datasets.py
index dac9ee80..643485f9 100644
--- a/src/python/test/test_remote_datasets.py
+++ b/src/python/test/test_remote_datasets.py
@@ -40,6 +40,9 @@ def _get_bunny_license_print(accept_license = False):
# Redirect stdout
sys.stdout = capturedOutput
+ if not exists("remote_datasets/bunny"):
+ makedirs("remote_datasets/bunny")
+
remote._fetch_remote("https://raw.githubusercontent.com/GUDHI/gudhi-data/main/points/bunny/bunny.npy", "bunny.npy", "remote_datasets/bunny",
'13f7842ebb4b45370e50641ff28c88685703efa5faab14edf0bb7d113a965e1b', accept_license)
# Reset redirect
@@ -72,6 +75,11 @@ def test_fetch_remote_datasets():
assert bunny_arr.shape == (35947, 3)
# Test printing existing LICENSE file when fetching bunny.npy with accept_license = False (default)
+ # Fetch LICENSE file
+ if not exists("remote_datasets/bunny"):
+ makedirs("remote_datasets/bunny")
+ remote._fetch_remote("https://raw.githubusercontent.com/GUDHI/gudhi-data/main/points/bunny/LICENSE", "LICENSE", "remote_datasets/bunny",
+ 'b763dbe1b2fc6015d05cbf7bcc686412a2eb100a1f2220296e3b4a644c69633a')
with open("remote_datasets/bunny/LICENSE") as f:
assert f.read().rstrip("\n") == _get_bunny_license_print().getvalue().rstrip("\n")