PyUnit lacks gravity?

Hugh Beyer beyer at incent.com
Sun Nov 10 01:01:45 EST 2002


I'm trying out PyUnit as a framework for my tests and am finding it tough
going... I'm sorry but it doesn't seem like TSTTCPW to *me*.

Right now I think I'm creating tests correctly and a test suite correctly,
but when I run it with a TextTestRunner instance I get the following dump:

Traceback (most recent call last):
  File "C:\\Jumanji\\AdSelectorTest.py", line 355, in ?
    unittest.main()
  File "C:\Python21\lib\unittest.py", line 663, in __init__
    self.runTests()
  File "C:\Python21\lib\unittest.py", line 700, in runTests
    result = self.testRunner.run(self.test)
  File "C:\Python21\lib\unittest.py", line 603, in run
    result.printErrors()
  File "C:\Python21\lib\unittest.py", line 568, in printErrors
    self.stream.writeln()
  File "C:\Python21\lib\unittest.py", line 513, in writeln
    self.write('\n') # text-mode streams translate to \r\n if needed
  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? This is python2.1 running in
IDLE on a Win2000 system.

Thanks.

    Hugh






More information about the Python-list mailing list