I've added an assertion helper to zope.testbrowser that provides
``assertEllipsis``, which is very helpful when using Testbrowser with
unittest.TestCase (instead of doctests).

Some examples:

self.assertEllipsis('...bar...', 'foo bar qux')
  # -> nothing happens

self.assertEllipsis('foo', 'bar')
  # -> AssertionError: Differences (ndiff with -expected +actual):
       - foo
       + bar

self.assertNotEllipsis('foo', 'foo')
  # -> AssertionError: "Value unexpectedly matches expression 'foo'."

For convenience, if no ``actual`` value is provided,
``self.browser.contents`` is used.

I'd like to cut a release of zope.testbrowser, if nobody has any
objections against my doing so. There are also unreleased changelog
entries about handleErrors and WSGI, which look fine to me.


Wolfgang Schnerring · w...@gocept.com · software development
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 219401 0 · fax +49 345 1229889 1
Python, Pyramid, Plone, Zope - consulting, development, hosting

Attachment: signature.asc
Description: Digital signature

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