diff options
author | Mario Melara <maamelara@gmail.com> | 2015-10-15 12:47:26 -0700 |
---|---|---|
committer | Mario Melara <maamelara@gmail.com> | 2015-10-15 12:47:26 -0700 |
commit | d328f4c3b631e59ed14f52cf38f3d05774100c15 (patch) | |
tree | 8906264e4c683d092255f134731305675f7cd96d /lib | |
parent | 29e03ac851f807e9fb5aefb687902e703d208615 (diff) | |
download | spack-d328f4c3b631e59ed14f52cf38f3d05774100c15.tar.gz spack-d328f4c3b631e59ed14f52cf38f3d05774100c15.tar.bz2 spack-d328f4c3b631e59ed14f52cf38f3d05774100c15.tar.xz spack-d328f4c3b631e59ed14f52cf38f3d05774100c15.zip |
Test suite for architecture class and functions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/test/architecture.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py new file mode 100644 index 0000000000..6ff22aaa59 --- /dev/null +++ b/lib/spack/spack/test/architecture.py @@ -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) |