From ffa6fed3a3205d15d6c9ff8ca8c92cbecdbe2a0c Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 17:20:06 +0200 Subject: unit test : custom module file load --- lib/spack/spack/test/modules.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3-70-g09d2