Hi Nikolaus, On Thu, May 19, 2016 at 12:34 -0700, Nikolaus Rath wrote: > Hello, > > I am testing a server. I am starting the server in a subprocess from a > fixture, and then issue requests to it from various tests. Unfortunately > this seems to have one big drawback: when a test fails, the capture > plugin does not display any output from the server process. > > After looking at the code, I think this is because the capture plugin > creates a new file descriptor for each test phase (setup, call, > teardown).
it reuses the same file descriptor for capturing IIRC. After each phase (setup, call, teardown) the FD is reset to position 0. Is your problem that the server is started during fixture setup and you'd like to see its standard out/err during the test call phase? > Would it be possible to instead re-use the same fd, and distinguish > between phases by recording the position after each phase? I think it's possible to not reset the FD when the test call phase starts. best, holger > If this sounds feasible and desireable, then I'll work on a pull > request. > > > Best, > -Nikolaus > > -- > GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F > Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F > > »Time flies like an arrow, fruit flies like a Banana.« > _______________________________________________ > pytest-dev mailing list > pytest-dev@python.org > https://mail.python.org/mailman/listinfo/pytest-dev _______________________________________________ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev