rename virtual module to provider_index

This commit is contained in:
Todd Gamblin 2016-06-05 00:52:52 -07:00
parent 1f5a21decf
commit ce6ac93abe
5 changed files with 16 additions and 12 deletions

View File

@ -42,7 +42,7 @@
import spack.error import spack.error
import spack.config import spack.config
import spack.spec import spack.spec
from spack.virtual import ProviderIndex from spack.provider_index import ProviderIndex
from spack.util.naming import * from spack.util.naming import *
# #

View File

@ -102,23 +102,26 @@
from StringIO import StringIO from StringIO import StringIO
from operator import attrgetter from operator import attrgetter
import yaml
from yaml.error import MarkedYAMLError
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.filesystem import join_path
from llnl.util.lang import *
from llnl.util.tty.color import *
import spack import spack
import spack.architecture import spack.architecture
import spack.compilers as compilers import spack.compilers as compilers
import spack.error import spack.error
import spack.parse import spack.parse
import yaml
from llnl.util.filesystem import join_path
from llnl.util.lang import *
from llnl.util.tty.color import *
from spack.build_environment import get_path_from_module, load_module from spack.build_environment import get_path_from_module, load_module
from spack.util.naming import mod_to_class from spack.util.naming import mod_to_class
from spack.util.prefix import Prefix from spack.util.prefix import Prefix
from spack.util.string import * from spack.util.string import *
from spack.version import * from spack.version import *
from spack.virtual import ProviderIndex from spack.provider_index import ProviderIndex
from yaml.error import MarkedYAMLError
# Valid pattern for an identifier in Spack # Valid pattern for an identifier in Spack
identifier_re = r'\w[\w-]*' identifier_re = r'\w[\w-]*'

View File

@ -32,6 +32,8 @@
from spack.test.tally_plugin import Tally from spack.test.tally_plugin import Tally
"""Names of tests to be included in Spack's test suite""" """Names of tests to be included in Spack's test suite"""
# All the tests Spack knows about.
# Keep these one per line so that it's easy to see changes in diffs.
test_names = [ test_names = [
'architecture', 'architecture',
'build_system_guess', 'build_system_guess',
@ -74,11 +76,10 @@
'url_parse', 'url_parse',
'url_substitution', 'url_substitution',
'versions', 'versions',
'virtual', 'provider_index',
'yaml', 'yaml',
] ]
def list_tests(): def list_tests():
"""Return names of all tests that can be run for Spack.""" """Return names of all tests that can be run for Spack."""
return test_names return test_names

View File

@ -26,15 +26,15 @@
import unittest import unittest
import spack import spack
from spack.virtual import ProviderIndex from spack.provider_index import ProviderIndex
class VirtualTest(unittest.TestCase): class ProviderIndexTest(unittest.TestCase):
def test_write_and_read(self): def test_write_and_read(self):
p = ProviderIndex(spack.repo.all_package_names()) p = ProviderIndex(spack.repo.all_package_names())
ostream = StringIO () ostream = StringIO()
p.to_yaml(ostream) p.to_yaml(ostream)
istream = StringIO(ostream.getvalue()) istream = StringIO(ostream.getvalue())