Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/p/y/pyroonga-HEAD/pyroonga/tests/unit/odm/test_query.py   pyroonga(Download)
        et = query.ExpressionTree('expr2', 'left1', 'right1')
        with pytest.raises(NotImplementedError):
            et.build(A)
 
    def test_build_without_nested(self, Expr):
        class A(Expr):
            operator = {'expr1': '|'}
        et = query.ExpressionTree('expr1', 'left1', 'right1')
        assert et.build(A) == '(left1|right1)'
        et2 = query.ExpressionTree('&', et1, 'right2')
        et3 = query.ExpressionTree('+', 'left3', et2)
        assert et3.build(A) == '(left3+((left1|right1)&right2))'
 
 

src/p/y/pyroonga-0.5.2/pyroonga/tests/unit/odm/test_query.py   pyroonga(Download)
        et = query.ExpressionTree('expr2', 'left1', 'right1')
        with pytest.raises(NotImplementedError):
            et.build(A)
 
    def test_build_without_nested(self, Expr):
        class A(Expr):
            operator = {'expr1': '|'}
        et = query.ExpressionTree('expr1', 'left1', 'right1')
        assert et.build(A) == '(left1|right1)'
        et2 = query.ExpressionTree('&', et1, 'right2')
        et3 = query.ExpressionTree('+', 'left3', et2)
        assert et3.build(A) == '(left3+((left1|right1)&right2))'