Test suite for architecture class and functions

This commit is contained in:
Mario Melara 2015-10-15 12:47:26 -07:00
parent 29e03ac851
commit d328f4c3b6

View file

@ -0,0 +1,19 @@
""" Test checks if the architecture class is created correctly and also that
the functions are looking for the correct architecture name
"""
import unittest
import spack
from spack.architecture import *
class ArchitectureTest(unittest.TestCase):
def test_Architecture_class(self):
a = Architecture('Cray-XC40')
a.add_arch_strategy()
self.assertEquals(a.get_arch_dict(), {'Cray-XC40': 'MODULES'})
def test_get_sys_type_from_config_file(self):
output_arch_class = get_sys_type_from_config_file()
my_arch_class = Architecture('Linux x86_64','Cray-xc40')
self.assertEqual(output_arch_class, my_arch_class)