summaryrefslogtreecommitdiff
path: root/lib/spack/spack/test/multimethod.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/test/multimethod.py')
-rw-r--r--lib/spack/spack/test/multimethod.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py
index 90948f010c..fbcc70afe8 100644
--- a/lib/spack/spack/test/multimethod.py
+++ b/lib/spack/spack/test/multimethod.py
@@ -118,3 +118,11 @@ def test_virtual_dep_match(builtin_mock):
pkg = spack.repo.get('multimethod^mpich@1.0')
assert pkg.different_by_virtual_dep() == 1
+
+
+def test_multimethod_with_base_class(builtin_mock):
+ pkg = spack.repo.get('multimethod@3')
+ assert pkg.base_method() == "subclass_method"
+
+ pkg = spack.repo.get('multimethod@1')
+ assert pkg.base_method() == "base_method"