multimethod: slight refactoring, documentation for code review
This commit is contained in:

committed by
Greg Becker

parent
2621af41d1
commit
b072c9b457
@@ -18,4 +18,4 @@ def diamond_inheritance(self):
|
||||
|
||||
@when('@4.0, 2.0')
|
||||
def diamond_inheritance(self):
|
||||
return "should never be reached"
|
||||
return "should never be reached by diamond inheritance test"
|
||||
|
@@ -148,4 +148,23 @@ def diamond_inheritance(self):
|
||||
|
||||
@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'
|
||||
|
Reference in New Issue
Block a user