Make url_fetch tests work on Windows (#44809)
This commit is contained in:
parent
99e3fdb180
commit
d8b0df6f5b
@ -173,8 +173,6 @@ def test_fetch(
|
|||||||
assert "echo Building..." in contents
|
assert "echo Building..." in contents
|
||||||
|
|
||||||
|
|
||||||
# TODO-27021
|
|
||||||
@pytest.mark.not_on_windows("Not supported on Windows (yet)")
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"spec,url,digest",
|
"spec,url,digest",
|
||||||
[
|
[
|
||||||
@ -205,7 +203,6 @@ def test_from_list_url(mock_packages, config, spec, url, digest, _fetch_method):
|
|||||||
assert fetch_strategy.extra_options == {"timeout": 60}
|
assert fetch_strategy.extra_options == {"timeout": 60}
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.not_on_windows("Not supported on Windows (yet)")
|
|
||||||
@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
|
@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"requested_version,tarball,digest",
|
"requested_version,tarball,digest",
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
import spack.paths
|
import spack.paths
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
|
from spack.util.url import path_to_file_url
|
||||||
|
|
||||||
|
|
||||||
class UrlListTest(Package):
|
class UrlListTest(Package):
|
||||||
@ -13,8 +14,8 @@ class UrlListTest(Package):
|
|||||||
homepage = "http://www.url-list-example.com"
|
homepage = "http://www.url-list-example.com"
|
||||||
|
|
||||||
web_data_path = join_path(spack.paths.test_path, "data", "web")
|
web_data_path = join_path(spack.paths.test_path, "data", "web")
|
||||||
url = "file://" + web_data_path + "/foo-0.0.0.tar.gz"
|
url = path_to_file_url(join_path(spack.paths.test_path, "data", "web") + "/foo-0.0.0.tar.gz")
|
||||||
list_url = "file://" + web_data_path + "/index.html"
|
list_url = path_to_file_url(join_path(spack.paths.test_path, "data", "web") + "/index.html")
|
||||||
list_depth = 3
|
list_depth = 3
|
||||||
|
|
||||||
version("0.0.0", md5="00000000000000000000000000000000")
|
version("0.0.0", md5="00000000000000000000000000000000")
|
||||||
|
Loading…
Reference in New Issue
Block a user