test/installer.py: remove commented code and inaccurate docstring (#29305)
This commit is contained in:
parent
79c0f631de
commit
c72735229f
@ -231,32 +231,12 @@ def _spec(spec, preferred_mirrors=None):
|
|||||||
|
|
||||||
def test_try_install_from_binary_cache(install_mockery, mock_packages,
|
def test_try_install_from_binary_cache(install_mockery, mock_packages,
|
||||||
monkeypatch):
|
monkeypatch):
|
||||||
"""Tests SystemExit path for_try_install_from_binary_cache.
|
"""Test return false when no match exists in the mirror"""
|
||||||
|
|
||||||
This test does not make sense. We tell spack there is a mirror
|
|
||||||
with a binary for this spec and then expect it to die because there
|
|
||||||
are no mirrors configured."""
|
|
||||||
# def _mirrors_for_spec(spec, full_hash_match=False):
|
|
||||||
# spec = spack.spec.Spec('mpi').concretized()
|
|
||||||
# return [{
|
|
||||||
# 'mirror_url': 'notused',
|
|
||||||
# 'spec': spec,
|
|
||||||
# }]
|
|
||||||
|
|
||||||
spec = spack.spec.Spec('mpich')
|
spec = spack.spec.Spec('mpich')
|
||||||
spec.concretize()
|
spec.concretize()
|
||||||
|
|
||||||
# monkeypatch.setattr(
|
|
||||||
# spack.binary_distribution, 'get_mirrors_for_spec', _mirrors_for_spec)
|
|
||||||
|
|
||||||
# with pytest.raises(SystemExit):
|
|
||||||
# inst._try_install_from_binary_cache(spec.package, False, False)
|
|
||||||
result = inst._try_install_from_binary_cache(spec.package, False, False)
|
result = inst._try_install_from_binary_cache(spec.package, False, False)
|
||||||
assert(not result)
|
assert(not result)
|
||||||
|
|
||||||
# captured = capsys.readouterr()
|
|
||||||
# assert 'add a spack mirror to allow download' in str(captured)
|
|
||||||
|
|
||||||
|
|
||||||
def test_installer_repr(install_mockery):
|
def test_installer_repr(install_mockery):
|
||||||
const_arg = installer_args(['trivial-install-test-package'], {})
|
const_arg = installer_args(['trivial-install-test-package'], {})
|
||||||
|
Loading…
Reference in New Issue
Block a user