Opened 15 years ago

Closed 15 years ago

#2405 defect closed fixed (fixed)

Various tests require stderr behavior CPython cannot and will not provide

Reported by: Jean-Paul Calderone Owned by:
Priority: highest Milestone:
Component: core Keywords:
Cc: Branch:


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.

Change History (4)

comment:1 Changed 15 years ago by Jean-Paul Calderone

Keywords: review added
Owner: Jean-Paul Calderone deleted
Priority: highhighest

Fixed in ignore-stderr-2405

comment:2 Changed 15 years ago by therve

Keywords: review removed
Owner: set to Jean-Paul Calderone

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.

comment:3 Changed 15 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(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.

comment:4 Changed 11 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.