Replace 2.6-incompatible skipIf with a conditional.

- skipIf doesn't work with Python 2.6.
This commit is contained in:
Todd Gamblin 2016-06-16 12:12:29 -07:00
parent f60ae61652
commit 005827ab23

View file

@ -253,10 +253,14 @@ def test_external_package(self):
self.assertFalse('externalprereq' in spec) self.assertFalse('externalprereq' in spec)
self.assertTrue(spec['externaltool'].compiler.satisfies('gcc')) self.assertTrue(spec['externaltool'].compiler.satisfies('gcc'))
@unittest.skipIf(spack.architecture.sys_type().name == 'darwin' or
spack.architecture.sys_type().name == 'linux',
"No tcl modules on darwin/linux machines")
def test_external_package_module(self): def test_external_package_module(self):
# No tcl modules on darwin/linux machines
# TODO: improved way to check for this.
if (spack.architecture.sys_type().name == 'darwin' or
spack.architecture.sys_type().name == 'linux'):
return
spec = Spec('externalmodule') spec = Spec('externalmodule')
spec.concretize() spec.concretize()
self.assertEqual(spec['externalmodule'].external_module, 'external-module') self.assertEqual(spec['externalmodule'].external_module, 'external-module')
@ -272,7 +276,7 @@ def test_nobuild_package(self):
got_error = True got_error = True
self.assertTrue(got_error) self.assertTrue(got_error)
def test_external_and_virtual(self): def test_external_and_virtual(self):
spec = Spec('externaltest') spec = Spec('externaltest')
spec.concretize() spec.concretize()