44from clang_tools import install_os
55from clang_tools .install import clang_tools_binary_url
66from clang_tools .util import check_install_os , download_file , get_sha_checksum
7+ from clang_tools import release_tag
78
89
910def test_check_install_os ():
@@ -13,12 +14,12 @@ def test_check_install_os():
1314
1415
1516@pytest .mark .parametrize (
16- "tag" , ["master-be694ee7" , pytest .param ("latest" , marks = pytest .mark .xfail )]
17+ "tag" , [release_tag , pytest .param ("latest" , marks = pytest .mark .xfail )]
1718)
1819def test_download_file (monkeypatch : pytest .MonkeyPatch , tmp_path : Path , tag : str ):
1920 """Test that deliberately fails to download a file."""
2021 monkeypatch .chdir (str (tmp_path ))
21- url = clang_tools_binary_url ("clang-format" , "12" , release_tag = tag )
22+ url = clang_tools_binary_url ("clang-format" , "12" , tag = release_tag )
2223 file_name = download_file (url , "file.tar.gz" , True )
2324 assert file_name is not None
2425
@@ -30,5 +31,5 @@ def test_get_sha(monkeypatch: pytest.MonkeyPatch):
3031 expected = Path (f"clang-format-12_{ install_os } -amd64.sha512sum" ).read_text (
3132 encoding = "utf-8"
3233 )
33- url = clang_tools_binary_url ("clang-format" , "12" , release_tag = "master-be694ee7" )
34+ url = clang_tools_binary_url ("clang-format" , "12" , tag = release_tag )
3435 assert get_sha_checksum (url ) == expected
0 commit comments