Example #1
0
def test_ConditionalRequirement_defaults(always):
    Cond = ConditionalRequirement(always)

    assert (
        (Cond.requirements, Cond.op, Cond.until, Cond.negated)
        == ((always,), operator.and_, None, None)
    )
Example #2
0
def test_custom_ConditionalRequirement(always):
    Cond = ConditionalRequirement(
        always, always, op=operator.xor, negated=True, until=False
    )
    assert (
        (Cond.requirements, Cond.op, Cond.until, Cond.negated)
        == ((always, always), operator.xor, False, True)
    )
Example #3
0
def test_empty_Conditional_is_True(member, request):
    Cond = ConditionalRequirement()
    assert Cond(member, request)