Has anyone given any thought to supporting the new constructs of 
unittest2 (http://pypi.python.org/pypi/unittest2) in zope.testing?

Using zope.testing 3.9.3 and a simple test case with unittest2, I made 
the following observations:

  - A basic test case works fine; a subclass of unittest2.TestCase is 
picked up for tests

  - The new assertions work.

  - The @skip, @skipIf, @skipUnless and @expectedFailure decorators 
work. However, there is a deprecation warning: "Use of a TestResult 
without an addExpectedFailure method is deprecated". In the output, 
zope.testing reports "Ran 2 tests with 0 failures and 0 errors" when 
running one skipped and one passing test.

  - setUpClass()/tearDownClass() methods are not executed

  - Neither are setUpModule()/tearDownModule() methods

Overall, it seems that we'd need to:

  - Make zope.testing aware of skipped tests and report these separately.

  - Call the class and module level fixture methods. I'm not entirely 
sure how these would interact with layers.


Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to