On Thu, Oct 12, 2006 at 20:18 +0200, holger krekel wrote:
> what about a test for this? At least on linux
> issuing specific "kill" commands etc. should work.
hum, even testing it by calling the function
might work - which would be a better "unit" test
than firing up sub sessions etc.
holger
> 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, [EMAIL PROTECTED] 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
> > [email protected]
> > http://codespeak.net/mailman/listinfo/py-svn
> >
>
> --
> merlinux GmbH Steinbergstr. 42 31139 Hildesheim
> http://merlinux.de tel +49 5121 20800 75 (fax 77)
> _______________________________________________
> py-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/py-dev
>
--
merlinux GmbH Steinbergstr. 42 31139 Hildesheim
http://merlinux.de tel +49 5121 20800 75 (fax 77)
_______________________________________________
py-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/py-dev