[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
a98203b539
commit
e382a180f2
2 changed files with 13 additions and 9 deletions
|
|
@ -475,17 +475,15 @@ class TestPinnedRocmLeafDigitParity:
|
|||
def test_install_ps1_pinned_reroute_requires_rocm_digit(self):
|
||||
text = INSTALL_PS1.read_text(encoding = "utf-8")
|
||||
# The pinned gfx*/rocm reroute must require a digit after rocm.
|
||||
assert re.search(
|
||||
r"\$_pinLeaf -like 'gfx\*' -or \$_pinLeaf -match '\^rocm\\d'", text
|
||||
), (
|
||||
assert re.search(r"\$_pinLeaf -like 'gfx\*' -or \$_pinLeaf -match '\^rocm\\d'", text), (
|
||||
"install.ps1 pinned-index reroute must use -match '^rocm\\d' (not a bare "
|
||||
"-like 'rocm*'), so rocm-current / rocm-rel-* fall through to the verbatim "
|
||||
"install instead of the ROCm --default-index path"
|
||||
)
|
||||
# The broad glob must be gone from that reroute.
|
||||
assert "-like 'rocm*'" not in text, (
|
||||
"install.ps1 must not route a pinned index on a bare -like 'rocm*' glob"
|
||||
)
|
||||
assert (
|
||||
"-like 'rocm*'" not in text
|
||||
), "install.ps1 must not route a pinned index on a bare -like 'rocm*' glob"
|
||||
|
||||
def test_install_sh_repairable_requires_rocm_digit(self):
|
||||
text = INSTALL_SH.read_text(encoding = "utf-8")
|
||||
|
|
|
|||
|
|
@ -166,9 +166,15 @@ class TestPinnedIndexClearsUvEnv:
|
|||
|
||||
def test_pinned_index_url_strips_uv_index_vars(self):
|
||||
cmd = [
|
||||
"uv", "pip", "install", "--force-reinstall",
|
||||
"torch", "torchvision", "torchaudio",
|
||||
"--index-url", "https://download.pytorch.org/whl/cu128",
|
||||
"uv",
|
||||
"pip",
|
||||
"install",
|
||||
"--force-reinstall",
|
||||
"torch",
|
||||
"torchvision",
|
||||
"torchaudio",
|
||||
"--index-url",
|
||||
"https://download.pytorch.org/whl/cu128",
|
||||
]
|
||||
with mock.patch.dict(
|
||||
os.environ,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue