[z3-five] Re: r10895 - z3/Five/branch/philikon-restructuring/form/tests

Philipp von Weitershausen philipp at weitershausen.de
Wed Apr 20 10:22:23 CEST 2005


Tres Seaver wrote:
  >> -def test_suite():
>> -    from unittest import TestSuite, makeSuite
>> -    suite = TestSuite()
>> -    suite.addTest(makeSuite(EditFormTest))
>> -    return suite
>> -
>>  if __name__ == '__main__':
>>      framework()
> 
> Phillip,
> 
> I don't know that the 'test_suite' is cruft for Zope2 based stuff (at 
> least I've had to add it back to something recently).  Does the 
> following still work for you, running from a Zope2 instance where you 
> have Five stitched in?
> 
>   $ bin/zopectl test --dir Products/Five

Dang. Of course, you're right, the test runner wants ``test_suite``. I 
removed it too soon and always ran the tests by running the test module 
by themselves.

Thanks for being watchful!

Philipp


philipp at bender:~/instances/five$ bin/zopectl test  --dir Products/Five/form/
Running tests via: /opt/bin/python2.3 /Users/philipp/dev/Zope27/test.py 
-v --config-file /Users/philipp/instances/five/etc/zope.conf --libdir 
Products --dir Products/Five/form/
Running unit tests at level 1
Running unit tests from /Users/philipp/instances/five/Products/Five/form
Parsing /Users/philipp/instances/five/etc/zope.conf
Installing Five ... done (0.815s)
E
======================================================================
ERROR: Invalid Test (Five.form.tests.test_editform)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/Users/philipp/dev/Zope27/test.py", line 509, in get_suite
     return mod.test_suite()
AttributeError: 'module' object has no attribute 'test_suite'

----------------------------------------------------------------------
Ran 0 tests in 0.000s

FAILED (errors=1)



More information about the z3-five mailing list