Example #1
0
    def setUp(self):
        # Disable logging to the console
        logging.disable(logging.CRITICAL + 1)

        self.cond = threading.Condition()
        self.server = FeedParserTestServer(self.cond)
        self.cond.acquire()
        self.server.start()

        # Wait until the server is ready
        while not self.server.ready:
            # Collect left over servers so they release their
            # sockets
            import gc
            gc.collect()
            self.cond.wait()

        self.cond.release()