<commit_before># Module:   sockets
# Date:     26th June 2006
# Author:   <NAME>, prologic at shortcircuit dot net dot au

"""Sockets Test Suite

Test all functionality of the sockets module.
"""

import unittest
from time import sleep

from circuits import Component
from circuits.workers import Thread
from circuits.lib.sockets import TCPServer, TCPClient, UDPServer, UDPClient

class Manager(Thread):

    client = None
    server = None
    events = 0

    def run(self):
        while self.running:
            self.flush()

            self.server.poll()
            
            if self.client.isConnected():
                self.client.poll()

class Client(Component):

    channel = "client"

    connected = False
    disconnected = False<commit_msg>tests.test_sockets: Fixed Manager by not calling isConnected on client which may be a Server component that doesn't have isConnected<commit_after># Module:   sockets
# Date:     26th June 2006
# Author:   <NAME>, prologic at shortcircuit dot net dot au

"""Sockets Test Suite

Test all functionality of the sockets module.
"""

import unittest
from time import sleep

from circuits import Component
from circuits.workers import Thread
from circuits.lib.sockets import TCPServer, TCPClient, UDPServer, UDPClient

class Manager(Thread):

    client = None
    server = None
    events = 0

    def run(self):
        while self.running:
            self.flush()
            self.server.poll()
            self.client.poll()

class Client(Component):

    channel = "client"

    connected = False
    disconnected = False
{'fraction_non_alphanumeric': 0.07473084230525649, 'fraction_numerical': 0.008866371120962635, 'mean_word_length': 2.8536585365853657, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6486825', 'n_tokens_mistral': 453, 'n_tokens_neox': 418, 'n_words': 159}