Ticket #2405 (closed defect: fixed )

Opened 2 years ago

Last modified 2 years ago

Various tests require stderr behavior CPython cannot and will not provide

Reported by: exarkun Assigned to: exarkun
Type: defect Priority: highest
Milestone: Component: core
Keywords: Cc:
Branch: Author:
Launchpad Bug:

Description

It is basically impossible for a CPython program to completely control its stderr output. Tests which rely on this cannot be made to pass reliably.

Some tests which cannot deal with bytes on stderr:

twisted.test.test_unix.UnixSocketTestCase?.testUncleanServerSocketLocking twisted.test.test_unix.UnixSocketTestCase?.testUncleanSocketLockingFromThePerspectiveOfAClientConnectingToTheDeadServerSocket twisted.test.test_stdio.StandardInputOutputTestCase?.testHostAndPeer twisted.test.test_stdio.StandardInputOutputTestCase?.testWriteSequence twisted.test.test_stdio.StandardInputOutputTestCase?.testWrite twisted.test.test_stdio.StandardInputOutputTestCase?.testLoseConnection twisted.test.test_stdio.StandardInputOutputTestCase?.testConsumer twisted.test.test_stdio.StandardInputOutputTestCase?.testProducer twisted.test.test_util.GetPasswordTest?.test_stdin

There may be others.

Attachments

Change History

  2007-01-31 16:32:30+00:00 changed by exarkun

  • keywords set to review
  • owner deleted
  • priority changed from high to highest

Fixed in ignore-stderr-2405

  2007-01-31 17:11:50+00:00 changed by therve

  • keywords deleted
  • owner set to exarkun

Mostly good. test_unix and test_util have been touched but did not get the usual cleanups.

Also, I was wondering how to prevent this from happening again ? Maybe add a note in coding standard ?

Anyway, when cleanups done, please merge.

  2007-01-31 19:42:12+00:00 changed by exarkun

  • status changed from new to closed
  • resolution set to fixed

(In [19537]) Merge ignore-stderr-2405

Author: exarkun Reviewer: therve Fixes #2405

Adjust tests which require Python child processes to be stderr-clean so that they no longer require this. Python makes it very difficult to guarantee no random bytes will appear on stderr, so Twisted should neither depend on nor promise this ability.

Note: See TracTickets for help on using tickets.