

def test_canonical_non_literal(self):
    'Test canonicalization, literals on left'
    v = ast.Number(42)
    l = ast.Literal('foo')
    cmp = ast.CompareOperator('=', v, l)
    compare.canonicalize(cmp)
    assert (cmp.left is l)
    assert (cmp.right is v)

dataset/ETHPy150Open armon/pypred/tests/unit/test_compare.py TestCompare.test_canonical_non_literal/original