diff options
author | alalazo <massimiliano.culpo@googlemail.com> | 2016-06-04 17:20:06 +0200 |
---|---|---|
committer | alalazo <massimiliano.culpo@googlemail.com> | 2016-06-04 17:20:06 +0200 |
commit | ffa6fed3a3205d15d6c9ff8ca8c92cbecdbe2a0c (patch) | |
tree | cdba45c20dbcc93644db2531c451af1358a7c59c /lib | |
parent | 422d3d4db60f7e00fdbda452c94bfb5d155f304e (diff) | |
download | spack-ffa6fed3a3205d15d6c9ff8ca8c92cbecdbe2a0c.tar.gz spack-ffa6fed3a3205d15d6c9ff8ca8c92cbecdbe2a0c.tar.bz2 spack-ffa6fed3a3205d15d6c9ff8ca8c92cbecdbe2a0c.tar.xz spack-ffa6fed3a3205d15d6c9ff8ca8c92cbecdbe2a0c.zip |
unit test : custom module file load
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/test/modules.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 7fb1c6a921..bf5555d9d4 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -75,8 +75,13 @@ configuration_alter_environment = { 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']} }, 'arch=x86-linux': { - 'environment': {'set': {'FOO': 'foo'}, - 'unset': ['BAR']} + 'environment': { + 'set': {'FOO': 'foo'}, + 'unset': ['BAR'] + } + }, + 'arch=x64-linux': { + 'load': ['foo/bar'] } } } @@ -203,6 +208,8 @@ class TclTests(MockPackagesTest): self.assertEqual( len([x for x in content if 'setenv FOO "foo"' in x]), 0) self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 0) + self.assertEqual(len([x for x in content if 'is-loaded foo/bar' in x]), 1) + self.assertEqual(len([x for x in content if 'module load foo/bar' in x]), 1) def test_blacklist(self): spack.modules.CONFIGURATION = configuration_blacklist |