PyUnit lacks gravity?

Hugh Beyer beyer at incent.com
Sun Nov 10 20:08:08 EST 2002


I actually did understand this was outside of unittest. But since IDLE
doesn't normally behave badly there must be some wierd interaction between
the two systems. I was hoping this was something that people had seen
before.

    Hugh

"Martin v. Loewis" <martin at v.loewis.de> wrote in message
news:m37kflc0pi.fsf at mira.informatik.hu-berlin.de...
> "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