diff options
Diffstat (limited to 'lib/spack/spack/test/multimethod.py')
-rw-r--r-- | lib/spack/spack/test/multimethod.py | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index c233ea4fd6..a885374080 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -25,15 +25,10 @@ """ Test for multi_method dispatch. """ -import unittest - import spack from spack.multimethod import * from spack.version import * -from spack.spec import Spec -from spack.multimethod import when from spack.test.mock_packages_test import * -from spack.version import * class MultiMethodTest(MockPackagesTest): @@ -42,7 +37,6 @@ class MultiMethodTest(MockPackagesTest): pkg = spack.repo.get('multimethod@2.0') self.assertRaises(NoSuchMethodError, pkg.no_version_2) - def test_one_version_match(self): pkg = spack.repo.get('multimethod@1.0') self.assertEqual(pkg.no_version_2(), 1) @@ -53,7 +47,6 @@ class MultiMethodTest(MockPackagesTest): pkg = spack.repo.get('multimethod@4.0') self.assertEqual(pkg.no_version_2(), 4) - def test_version_overlap(self): pkg = spack.repo.get('multimethod@2.0') self.assertEqual(pkg.version_overlap(), 1) @@ -61,7 +54,6 @@ class MultiMethodTest(MockPackagesTest): pkg = spack.repo.get('multimethod@5.0') self.assertEqual(pkg.version_overlap(), 2) - def test_mpi_version(self): pkg = spack.repo.get('multimethod^mpich@3.0.4') self.assertEqual(pkg.mpi_version(), 3) @@ -72,7 +64,6 @@ class MultiMethodTest(MockPackagesTest): pkg = spack.repo.get('multimethod^mpich@1.0') self.assertEqual(pkg.mpi_version(), 1) - def test_undefined_mpi_version(self): pkg = spack.repo.get('multimethod^mpich@0.4') self.assertEqual(pkg.mpi_version(), 1) @@ -80,7 +71,6 @@ class MultiMethodTest(MockPackagesTest): pkg = spack.repo.get('multimethod^mpich@1.4') self.assertEqual(pkg.mpi_version(), 1) - def test_default_works(self): pkg = spack.repo.get('multimethod%gcc') self.assertEqual(pkg.has_a_default(), 'gcc') @@ -91,21 +81,19 @@ class MultiMethodTest(MockPackagesTest): pkg = spack.repo.get('multimethod%pgi') self.assertEqual(pkg.has_a_default(), 'default') - def test_target_match(self): platform = spack.architecture.platform() targets = platform.targets.values() for target in targets[:-1]: - pkg = spack.repo.get('multimethod target='+target.name) + pkg = spack.repo.get('multimethod target=' + target.name) self.assertEqual(pkg.different_by_target(), target.name) - pkg = spack.repo.get('multimethod target='+targets[-1].name) + pkg = spack.repo.get('multimethod target=' + targets[-1].name) if len(targets) == 1: self.assertEqual(pkg.different_by_target(), targets[-1].name) else: self.assertRaises(NoSuchMethodError, pkg.different_by_target) - def test_dependency_match(self): pkg = spack.repo.get('multimethod^zmpi') self.assertEqual(pkg.different_by_dep(), 'zmpi') @@ -118,7 +106,6 @@ class MultiMethodTest(MockPackagesTest): pkg = spack.repo.get('multimethod^foobar') self.assertEqual(pkg.different_by_dep(), 'mpich') - def test_virtual_dep_match(self): pkg = spack.repo.get('multimethod^mpich2') self.assertEqual(pkg.different_by_virtual_dep(), 2) |