From 09b1daa7b971eaac221cbd1c043df8f46a38fa33 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 16:23:41 +0200 Subject: [PATCH] unit test : write a blacklisted module --- lib/spack/spack/test/modules.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 098777c48b..46d6824acd 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -211,6 +211,9 @@ def test_blacklist(self): print('\n'.join(content)) self.assertEqual(len([x for x in content if 'is-loaded' in x]), 1) self.assertEqual(len([x for x in content if 'module load ' in x]), 1) + spec = spack.spec.Spec('callpath arch=x86-linux') + # Returns a StringIO instead of a string as no module file was written + self.assertRaises(AttributeError, self.get_modulefile_content, spec) def test_conflicts(self): spack.modules.CONFIGURATION = configuration_conflicts