def test_and_replace(self):
        t = ast.Constant(True)
        f = ast.Constant(False)
        n = ast.LogicalOperator('and', t, f)

        # Should reduce to False
        c, r = optimizer.optimization_pass(n)
        assert c == 1
        assert isinstance(r, ast.Constant)
        assert r.value == False

        # Should reduce to False
        n = ast.LogicalOperator('and', f, t)
        c, r = optimizer.optimization_pass(n)
        assert c == 1
        assert isinstance(r, ast.Constant)
        assert r.value == False
Test AND -> False
dataset/ETHPy150Open armon/pypred/tests/unit/test_optimizer.py/TestOptimizer.test_and_replace