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

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/d/h/DHTBot-HEAD/dhtbot/test/coding/test_krpc_coder.py   DHTBot(Download)
from twisted.trial import unittest
 
from dhtbot.coding.krpc_coder import (
        encode, decode, _chunkify, _decode_addresses,
        InvalidKRPCError)
        node_strings = node_string * 10
        # _chunkify returns a generator
        split_node_strings = _chunkify(node_strings, 26)
        self.assertEquals(10, len(list(split_node_strings)))
 
        address_strings = address_string * 10
        # _chunkify returns a generator
        split_address_strings = _chunkify(address_strings, 6)
        self.assertEquals(10, len(list(split_address_strings)))