[py-dev] [py-svn] r33226 - py/dist/py/test/rsession
holger krekel
holger at merlinux.de
Thu Oct 12 20:18:32 CEST 2006
Hi Maciej!
what about a test for this? At least on linux
issuing specific "kill" commands etc. should work.
And thinking about good ways to test such things
helps to be confident about py.test-distributed ...
best,
holger
On Thu, Oct 12, 2006 at 14:12 +0200, fijal at codespeak.net wrote:
> Author: fijal
> Date: Thu Oct 12 14:12:37 2006
> New Revision: 33226
>
> Modified:
> py/dist/py/test/rsession/rsession.py
> Log:
> Better signal reporting.
>
>
> Modified: py/dist/py/test/rsession/rsession.py
> ==============================================================================
> --- py/dist/py/test/rsession/rsession.py (original)
> +++ py/dist/py/test/rsession/rsession.py Thu Oct 12 14:12:37 2006
> @@ -98,7 +98,10 @@
> host = event.channel.gateway.sshaddress
> self.out.sep('_', "%s on %s" %
> (" ".join(event.item.listnames()), host))
> - self.repr_failure(event.item, event.outcome)
> + if event.outcome.signal:
> + self.repr_signal(event.item, event.outcome)
> + else:
> + self.repr_failure(event.item, event.outcome)
>
> def repr_failure(self, item, outcome):
> excinfo = outcome.excinfo
> @@ -117,7 +120,16 @@
> if outcome.stderr:
> self.out.sep('-', " Captured process stderr: ")
> self.out.write(outcome.stderr)
> -
> +
> + def repr_signal(self, item, outcome):
> + signal = outcome.signal
> + self.out.line("Received signal: %d" % outcome.signal)
> + if outcome.stdout:
> + self.out.sep('-', " Captured process stdout: ")
> + self.out.write(outcome.stdout)
> + if outcome.stderr:
> + self.out.sep('-', " Captured process stderr: ")
> + self.out.write(outcome.stderr)
>
> def repr_failure_tblong(self, item, excinfo, traceback):
> for index, entry in py.builtin.enumerate(traceback):
> _______________________________________________
> py-svn mailing list
> py-svn at codespeak.net
> http://codespeak.net/mailman/listinfo/py-svn
>
--
merlinux GmbH Steinbergstr. 42 31139 Hildesheim
http://merlinux.de tel +49 5121 20800 75 (fax 77)
More information about the Pytest-dev
mailing list