def empty_condition(): return DiscreteCondition()
def test_iter(self, mock_elem): condition = DiscreteCondition.from_elem_args(mock_elem) elems = [] for elem in condition: elems.append(elem) assert elems == [mock_elem]
def test_getitem_neg_index(self, mock_elem): condition = DiscreteCondition.from_elem_args(mock_elem) assert condition[-1] == mock_elem
def test_ne_pos_case(self, make_mock_elem): elem = make_mock_elem() condition = DiscreteCondition.from_elem_args(elem) diff_elem = make_mock_elem() diff_condition = DiscreteCondition.from_elem_args(diff_elem) assert condition != diff_condition
def test_eq_pos_case(self, make_mock_elem): elem = make_mock_elem() condition = DiscreteCondition.from_elem_args(elem) same_condition = DiscreteCondition.from_elem_args(elem) assert condition == same_condition
def test_append(self, mock_elem): condition = DiscreteCondition.from_elem_args(mock_elem) assert condition._elems[-1] == mock_elem
def one_elem_condition(mock_elem): return DiscreteCondition.from_elem_args(mock_elem)