Author martin.panter
Recipients BreamoreBoy, martin.panter, pitrou, vstinner
Date 2015-06-21.10:28:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
See Issue 1186900 about the NNTP client raising EOFError.

As for the “cannot read from timed out object” errors (also reported in Issue 19613), I think the test classes are bad. The test logs don’t seem to be available, but I reckon that the previous test to the failing test would have been skipped due to the transient Internet handler. The test classes are essentially coded like this:

class NetworkedNNTP_SSLTests(TestCase):
    def setUpClass(cls):
        with support.transient_internet(cls.NNTP_HOST):
            cls.server = NNTP_SSL(cls.NNTP_HOST, timeout=TIMEOUT)
    def test_that_triggered_the_failure(self):
        with support.transient_internet(self.NNTP_HOST):
            ...  # Suppose this timed out and the test was skipped
    def test_capabilities(self):
        # Now this is reusing the existing connection, left in a broken state by
        # the previous test

Either the server connection should be freshly made for each individual test case (not once per class), or all the test cases grouped by setUpClass() should be skipped if the transient Internet handler kicks in. I’m not sure if it is practical to do the second option with the standard unittest module. Perhaps the method wrapping stage could add some extra checks to see if the test should be skipped.
Date User Action Args
2015-06-21 10:28:37martin.pantersetrecipients: + martin.panter, pitrou, vstinner, BreamoreBoy
2015-06-21 10:28:37martin.pantersetmessageid: <>
2015-06-21 10:28:37martin.panterlinkissue19756 messages
2015-06-21 10:28:37martin.pantercreate