def test_or_and(self): assert plural._Parser('n = 0 or n != 1 and n % 100 = 1..19').ast == \ ('or', (self.n_eq(0), ('and', (plural.negate(self.n_eq(1)), ('relation', ('in', ('mod', (self.n, plural.value_node(100))), (make_range_list((1, 19))))))) ))
def test_negate(self): assert plural._Parser('n != 1').ast == plural.negate(self.n_eq(1))