Created
January 22, 2017 18:24
-
-
Save Alphadelta14/8a7febc4db9481a6a82469cb653e518d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BoundCondition(ConditionalMixin): | |
def __init__(self, build=None, suite=None, callback=None): | |
self.bound_build = build | |
self.bound_suite = suite | |
self.bound_callback = callback | |
ConditionalMixin.__init__(self) | |
@staticmethod | |
def build(build_inst): | |
condition = BoundCondition(build=build_inst) | |
condition.build = build_inst | |
return condition | |
def and_(self, other): | |
new = BoundCondition( | |
build=self.bound_build, suite=self.bound_suite, callback=self.bound_callback | |
) | |
new.sub_conditions = [self, other] | |
new.sub_condition_any = False | |
return new | |
__and__ = and_ | |
__add__ = and_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment