

def test_canonical_static_order(self):
    'Test canonicalization, static ordering'
    static = ast.Literal("'string'")
    static.static = True
    static.static_val = 'string'
    static2 = ast.Literal("'foo'")
    static2.static = True
    static2.static_val = 'foo'
    cmp = ast.CompareOperator('<', static, static2)
    compare.canonicalize(cmp)
    assert (cmp.left is static2)
    assert (static2.right is static)
    assert (cmp.type == '>')

dataset/ETHPy150Open armon/pypred/tests/unit/test_compare.py TestCompare.test_canonical_static_order/VarMisuse@85/118 `cmp`->`static2`