'Test preferred package versions are applied correctly'

def test_preferred_versions(self):

    update_packages('mpileaks', 'version', ['2.3'])
    spec = concretize('mpileaks')
    assert (spec.version == spack.spec.Version('2.3'))
    update_packages('mpileaks', 'version', ['2.2'])
    spec = concretize('mpileaks')
    assert (spec.version == spack.spec.Version('2.2'))
