Windows python 2.2.1 IDLE glitch - unittest output display nothing

David LeBlanc whisper at oz.net
Sat May 25 17:31:43 EDT 2002


It may work if you do "python idle.py" from a command console and leave the
console open. Don't use Pythonw since that disconnects the app from the
console.

Since Windows lacks a unified stdio for consoles and gui apps, redirection
won't work and that's why you're seeing the difference between Windows and
Linux.

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Andy Bulka
> Sent: Saturday, May 25, 2002 6:53
> To: python-list at python.org
> Subject: Windows python 2.2.1 IDLE glitch - unittest output display
> nothing
>
>
> When running a script using CTRL-F5 under IDLE under windows 2000,
> python 2.2.1 I find that unittests run but the resulting stderr output
> does not appear at all?  For example:
>
> import unittest, random
>
> class TestCase00(unittest.TestCase):
>     def checkA(self):
>         assert 1
>     def checkB(self):
>         assert 0
>
> def suite():
>     suite1 = unittest.makeSuite(TestCase00,'check')
>     alltests = unittest.TestSuite( (suite1,) )
>     return alltests
>
> def main():
>     runner = unittest.TextTestRunner(descriptions=0, verbosity=2
>     runner.run( suite() )
>
> if __name__ == '__main__':
>     print 'Gonna run some tests...'
>     main()
>
>
> It's as if stderr is 'lost' somewhere.  This problem does not appear
> under linux 2.2.1c - only windows (I can reproduce this problem under
> two versions of windows 2000.)
>
> All my scripts with unittests thus cannot be tested using CTRL-F5 (Run
> Script), which is pretty serious.  What is going on?
>
> IDLE under the previous version python 2.1.3 works fine, as do
> versions 2.1.3 & 2.2.1 of activestate pythonwin (work fine, that is).
> All versions of IDLEfork 0.8.1 work ok too.  Its only the standard
> IDLE with the latest python 2.2.1 under windows has this problem.
>
> -Andy Bulka
> www.atug.com/andypatterns
> --
> http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list