test/installer.py: remove commented code and inaccurate docstring (#29305)
This commit is contained in:
		@@ -231,32 +231,12 @@ def _spec(spec, preferred_mirrors=None):
 | 
			
		||||
 | 
			
		||||
def test_try_install_from_binary_cache(install_mockery, mock_packages,
 | 
			
		||||
                                       monkeypatch):
 | 
			
		||||
    """Tests SystemExit path for_try_install_from_binary_cache.
 | 
			
		||||
 | 
			
		||||
       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,
 | 
			
		||||
    #     }]
 | 
			
		||||
 | 
			
		||||
    """Test return false when no match exists in the mirror"""
 | 
			
		||||
    spec = spack.spec.Spec('mpich')
 | 
			
		||||
    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)
 | 
			
		||||
    assert(not result)
 | 
			
		||||
 | 
			
		||||
    # captured = capsys.readouterr()
 | 
			
		||||
    # assert 'add a spack mirror to allow download' in str(captured)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def test_installer_repr(install_mockery):
 | 
			
		||||
    const_arg = installer_args(['trivial-install-test-package'], {})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user