diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin.mock/packages/multimethod-diamond-parent/package.py | 2 | ||||
-rw-r--r-- | var/spack/repos/builtin.mock/packages/multimethod/package.py | 21 |
2 files changed, 21 insertions, 2 deletions
diff --git a/var/spack/repos/builtin.mock/packages/multimethod-diamond-parent/package.py b/var/spack/repos/builtin.mock/packages/multimethod-diamond-parent/package.py index d3413a36b5..e10e5497af 100644 --- a/var/spack/repos/builtin.mock/packages/multimethod-diamond-parent/package.py +++ b/var/spack/repos/builtin.mock/packages/multimethod-diamond-parent/package.py @@ -18,4 +18,4 @@ class MultimethodDiamondParent(MultimethodBase): @when('@4.0, 2.0') def diamond_inheritance(self): - return "should never be reached" + return "should never be reached by diamond inheritance test" diff --git a/var/spack/repos/builtin.mock/packages/multimethod/package.py b/var/spack/repos/builtin.mock/packages/multimethod/package.py index 738e41be41..558d99717f 100644 --- a/var/spack/repos/builtin.mock/packages/multimethod/package.py +++ b/var/spack/repos/builtin.mock/packages/multimethod/package.py @@ -148,4 +148,23 @@ class Multimethod(MultimethodBase): @when('@4.0') def diamond_inheritance(self): - return "should_not_be_reached" + return "should_not_be_reached by diamond inheritance test" + + # + # Check that multimethods work with boolean values + # + @when(True) + def boolean_true_first(self): + return 'True' + + @when(False) + def boolean_true_first(self): + return 'False' + + @when(False) + def boolean_false_first(self): + return 'False' + + @when(True) + def boolean_false_first(self): + return 'True' |