Re: [Zope-dev] Re: Test failure in zope.component on 2.10 branch
On Mon, Apr 28, 2008 at 05:26:36PM -0400, Benji York wrote: > On Mon, Apr 28, 2008 at 5:09 PM, Paul Winkler <[EMAIL PROTECTED]> wrote: > > The test was failing on those, because it expects "OK" to be the last > > thing printed by the subprocess. > > I don't have any idea what you're talking about, so ignore me if I'm > totally off-base... but: shouldn't the thing that is running the tests > be looking for exit code instead of sniffing for particular output on > stdout? Good question. The subprocess that's run is lib/python/zope/component/standalonetests.py which runs a typical unittest.main(). Does that not exit 1 on failures, on all platforms? (What happens on windows?) btw, the calling code (zope/component/tests.py) was made somewhat more robust between 2.10 and 2.11, but it's still sniffing stdout. -- Paul Winkler http://www.slinkp.com ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: Test failure in zope.component on 2.10 branch
On Mon, Apr 28, 2008 at 5:09 PM, Paul Winkler <[EMAIL PROTECTED]> wrote: > The test was failing on those, because it expects "OK" to be the last > thing printed by the subprocess. I don't have any idea what you're talking about, so ignore me if I'm totally off-base... but: shouldn't the thing that is running the tests be looking for exit code instead of sniffing for particular output on stdout? ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Test failure in zope.component on 2.10 branch
False alarm. It turned out to be spew that I've seen before only under certain circumstances: if you're on a gentoo box and your $TERM env. var. is set to "xterm", then importing readline causes some non-printable characters to be written to stdout. The test was failing on those, because it expects "OK" to be the last thing printed by the subprocess. I can make it pass by setting TERM=linux or TERM=xterm-color. I can't reproduce on any other *nix I've tried (ubuntu, OSX). *Shrug* FWIW here's a demo of the garbage output from importing readline: [EMAIL PROTECTED] ~ $ TERM=xterm python -c "import readline" | od -c 000 033 [ ? 1 0 3 4 h 010 [EMAIL PROTECTED] ~ $ TERM=linux python -c "import readline" | od -c 000 On Mon, Apr 28, 2008 at 4:50 PM, Tres Seaver <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > Paul Winkler wrote: > > Does anybody else see this on a fresh checkout of the zope 2.10 branch? > > I think it's pretty new; I had a checkout last week where I didn't get > > any test failures. > > > > [EMAIL PROTECTED] ~/tmp/z2branches/2.10 $ python test.py -s zope.component > > Running tests at level 1 > > Running unit tests: > > Running: > > > > > > > Failure in test testStandalone (zope.component.tests.StandaloneTests) > > Traceback (most recent call last): > > File "/usr/lib/python2.4/unittest.py", line 260, in run > > testMethod() > > File "/home/pw/tmp/z2branches/2.10/lib/python/zope/component/tests.py", > > line 975, in testStandalone > > self.fail(''.join(lines)) > > File "/usr/lib/python2.4/unittest.py", line 301, in fail > > raise self.failureException, msg > > AssertionError: . > > -- > > Ran 1 test in 0.011s > > I don't see that issue. What is the content of the 'lines' local > variable there? (Run with '-D' to get a postmortem). > > > Tres. > - -- > === > Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] > Palladion Software "Excellence by Design"http://palladion.com > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFIFjiO+gerLs4ltQ4RAi0LAJ0Z8w7cExs/I3ujQKm9Y+CR97WFKgCeKUo7 > 6aEQeB/Iv2evxOkQnD8O7yk= > =oRhO > -END PGP SIGNATURE- > -- http://www.slinkp.com ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Test failure in zope.component on 2.10 branch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Winkler wrote: > Does anybody else see this on a fresh checkout of the zope 2.10 branch? > I think it's pretty new; I had a checkout last week where I didn't get > any test failures. > > [EMAIL PROTECTED] ~/tmp/z2branches/2.10 $ python test.py -s zope.component > Running tests at level 1 > Running unit tests: > Running: > > > Failure in test testStandalone (zope.component.tests.StandaloneTests) > Traceback (most recent call last): > File "/usr/lib/python2.4/unittest.py", line 260, in run > testMethod() > File "/home/pw/tmp/z2branches/2.10/lib/python/zope/component/tests.py", > line 975, in testStandalone > self.fail(''.join(lines)) > File "/usr/lib/python2.4/unittest.py", line 301, in fail > raise self.failureException, msg > AssertionError: . > -- > Ran 1 test in 0.011s I don't see that issue. What is the content of the 'lines' local variable there? (Run with '-D' to get a postmortem). Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIFjiO+gerLs4ltQ4RAi0LAJ0Z8w7cExs/I3ujQKm9Y+CR97WFKgCeKUo7 6aEQeB/Iv2evxOkQnD8O7yk= =oRhO -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )