def test_get_conjuncts_and_op(self): a, b = Signal("a"), Signal("b") conjunction_expr = BinOp("*", a, b) conjuncts = _get_conjuncts(conjunction_expr) assert len(conjuncts) == 2 assert a in conjuncts assert b in conjuncts
def test_get_conjuncts_and_op(self): a, b = Signal('a'), Signal('b') conjunction_expr = BinOp('*', a, b) conjuncts = _get_conjuncts(conjunction_expr) assert len(conjuncts) == 2 assert a in conjuncts assert b in conjuncts
def test_get_conjuncts_recursion(self): a, b, c = Signal("a"), Signal("b"), Signal("c") conjunction_expr = BinOp("*", a, BinOp("*", b, c)) conjuncts = _get_conjuncts(conjunction_expr) assert len(conjuncts) == 3
def test_get_conjuncts_no_conjuncts(self): a, b = Signal("a"), Signal("b") conjunction_expr = BinOp("+", a, b) conjuncts = _get_conjuncts(conjunction_expr) assert conjuncts == [conjunction_expr], str(conjunction_expr)
def test_get_conjuncts_recursion(self): a, b, c = Signal('a'), Signal('b'), Signal('c') conjunction_expr = BinOp('*', a, BinOp('*', b, c)) conjuncts = _get_conjuncts(conjunction_expr) assert len(conjuncts) == 3
def test_get_conjuncts_no_conjuncts(self): a, b = Signal('a'), Signal('b') conjunction_expr = BinOp('+', a, b) conjuncts = _get_conjuncts(conjunction_expr) assert conjuncts == [conjunction_expr], str(conjunction_expr)