spack/var/spack/repos/builtin.mock/packages/multimethod-diamond/package.py
Gregory Becker 2621af41d1 fix MRO for multimethod.__call__ using iterative algorithm.
Add tests MRO for inherited multimethods with multiple inheritance
Add tests for inherited and overridden multimethods
2018-12-06 15:48:23 -08:00

19 lines
647 B
Python

# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.pkg.builtin.mock.multimethod_inheritor as mi
import spack.pkg.builtin.mock.multimethod_diamond_parent as mp
class MultimethodDiamond(mi.MultimethodInheritor, mp.MultimethodDiamondParent):
"""This package is designed for use with Spack's multimethod test.
It has a bunch of test cases for the @when decorator that the
test uses.
"""
@when('@4.0')
def diamond_inheritance(self):
return 'subclass'