From 358bfdaaf1e90c2ab06411ace68cb58b318f9ed7 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 23 Dec 2013 10:28:50 -0800 Subject: Another multimethod test for vdeps --- lib/spack/spack/test/mock_packages/multimethod.py | 7 +++---- lib/spack/spack/test/multimethod.py | 10 +++++----- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/test/mock_packages/multimethod.py b/lib/spack/spack/test/mock_packages/multimethod.py index fa8497eafc..e5c2f5243e 100644 --- a/lib/spack/spack/test/mock_packages/multimethod.py +++ b/lib/spack/spack/test/mock_packages/multimethod.py @@ -92,10 +92,9 @@ class Multimethod(Package): # # Make sure we can switch on virtual dependencies # - @when('^mpi@2:') def different_by_virtual_dep(self): - return 'mpi@2:' + return 1 - @when('^mpi@:1') + @when('^mpi@2:') def different_by_virtual_dep(self): - return 'mpi@:1' + return 2 diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index 4627e06142..969c987da8 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -76,9 +76,9 @@ class MultiMethodTest(MockPackagesTest): self.assertRaises(AmbiguousMethodError, pkg.different_by_dep) - def test_one_dep_match(self): - pass + def test_virtual_dep_match(self): + pkg = packages.get('multimethod^mpich2') + self.assertEqual(pkg.different_by_virtual_dep(), 2) - - def test_one_dep_match(self): - pass + pkg = packages.get('multimethod^mpich@1.0') + self.assertEqual(pkg.different_by_virtual_dep(), 1) -- cgit v1.2.3-60-g2f50