PyUnit lacks gravity?
Martin v. Loewis
martin at v.loewis.de
Sun Nov 10 03:01:45 EST 2002
"Hugh Beyer" <beyer at incent.com> writes:
> File "C:\PYTHON21\Tools\idle\PyShell.py", line 676, in write
> self.shell.write(s, self.tags)
> File "C:\PYTHON21\Tools\idle\PyShell.py", line 662, in write
> self.text.mark_gravity("iomark", "right")
> AttributeError: 'None' object has no attribute 'mark_gravity'
>
> Last I checked, gravity here was Earth normal. I'm running unitttest.main()
> to set up the suite, but I get the same error if I create and run the test
> suite myself. Any ideas what's going wrong?
Study the traceback! This is in IDLE, not in unittest. self.text is
None.
This happens when somebody closes sys.stdout, in IDLE: future writes
to sys.stdout fail. Now, I cannot guess why sys.stdout was closed in
your case; you should modify IDLE to raise an exception in close, to
see where the close originates from.
Regards,
Martin
More information about the Python-list
mailing list