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

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

src/p/y/pyroonga-0.5.2/pyroonga/tests/functional/odm/test_table.py   pyroonga(Download)
    def get_tableinfo(self, *args):
        result = utils.to_python(
            json.loads(test_utils.sendquery('table_list'))[1], 0)
        tableinfo = []
        for name in args:
    def get_columninfo(self, tablename):
        result = json.loads(test_utils.sendquery('column_list %s' % tablename))
        return utils.to_python(result[1], 0)
 
    def assertGroongaResultEqual(self, result, expect, all_len):
    def _insert(self, tbl, data):
        data = json.dumps(data)
        test_utils.sendquery('load --table %s --input_type json --values\n%s' %
                (tbl, data))
 
        grn = Groonga()
        Table.bind(grn)
        test_utils.sendquery('table_create --name %s --flags TABLE_HASH_KEY'
                             ' --key_type ShortText' % Tb.__tablename__)
        test_utils.sendquery('column_create --table %s --name title --flags'

src/p/y/pyroonga-HEAD/pyroonga/tests/functional/odm/test_table.py   pyroonga(Download)
    def get_tableinfo(self, *args):
        result = utils.to_python(
            json.loads(test_utils.sendquery('table_list'))[1], 0)
        tableinfo = []
        for name in args:
    def get_columninfo(self, tablename):
        result = json.loads(test_utils.sendquery('column_list %s' % tablename))
        return utils.to_python(result[1], 0)
 
    def assertGroongaResultEqual(self, result, expect, all_len):
    def _insert(self, tbl, data):
        data = json.dumps(data)
        test_utils.sendquery('load --table %s --input_type json --values\n%s' %
                (tbl, data))
 
        grn = Groonga()
        Table.bind(grn)
        test_utils.sendquery('table_create --name %s --flags TABLE_HASH_KEY'
                             ' --key_type ShortText' % Tb.__tablename__)
        test_utils.sendquery('column_create --table %s --name title --flags'

src/p/y/pyroonga-0.5.2/pyroonga/tests/functional/odm/test_query.py   pyroonga(Download)
        grn = pyroonga.Groonga()
        Table.bind(grn)
        test_utils.sendquery('table_create --name %s --flags TABLE_HASH_KEY'
                             ' --key_type ShortText' % Tb.__tablename__)
        test_utils.sendquery('column_create --table %s --name name --flags'
        assert record2.name == 'bar'
        assert record3.name == 'baz'
        records = json.loads(test_utils.sendquery('select --table %s' %
                                                  Table1.__tablename__))
        assert records[1][0][2:] == [[1, 'key1', 'foo'], [2, 'key2', 'bar'],
        assert record2.name == 'bar'
        assert record3.name == 'baz'
        records = json.loads(test_utils.sendquery('select --table %s' %
                                                  Table1.__tablename__))
        assert records[1][0][2:] == [[1, 'key1', expected1],
        assert record2.name == expected2
        assert record3.name == 'baz'
        records = json.loads(test_utils.sendquery('select --table %s' %
                                                  Table1.__tablename__))
        assert records[1][0][2:] == [[1, 'key1', expected1],

src/p/y/pyroonga-HEAD/pyroonga/tests/functional/odm/test_query.py   pyroonga(Download)
        grn = pyroonga.Groonga()
        Table.bind(grn)
        test_utils.sendquery('table_create --name %s --flags TABLE_HASH_KEY'
                             ' --key_type ShortText' % Tb.__tablename__)
        test_utils.sendquery('column_create --table %s --name name --flags'
        assert record2.name == 'bar'
        assert record3.name == 'baz'
        records = json.loads(test_utils.sendquery('select --table %s' %
                                                  Table1.__tablename__))
        assert records[1][0][2:] == [[1, 'key1', 'foo'], [2, 'key2', 'bar'],
        assert record2.name == 'bar'
        assert record3.name == 'baz'
        records = json.loads(test_utils.sendquery('select --table %s' %
                                                  Table1.__tablename__))
        assert records[1][0][2:] == [[1, 'key1', expected1],
        assert record2.name == expected2
        assert record3.name == 'baz'
        records = json.loads(test_utils.sendquery('select --table %s' %
                                                  Table1.__tablename__))
        assert records[1][0][2:] == [[1, 'key1', expected1],

src/p/y/pyroonga-0.5.2/pyroonga/tests/functional/conftest.py   pyroonga(Download)
                def remove_table():
                    utils.sendquery('table_remove %s' % cls._tablename)
                request.addfinalizer(remove_table)
            return cls._tablename
    Tbl = tablebase(cls=TableBaseForTest)

src/p/y/pyroonga-HEAD/pyroonga/tests/functional/conftest.py   pyroonga(Download)
                def remove_table():
                    utils.sendquery('table_remove %s' % cls._tablename)
                request.addfinalizer(remove_table)
            return cls._tablename
    Tbl = tablebase(cls=TableBaseForTest)