Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

zope.testing: Define __add__ for RENormalizing

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


cz at gocept

Jun 18, 2009, 1:00 AM

Post #1 of 3 (410 views)
Permalink
zope.testing: Define __add__ for RENormalizing

Hi,

I suggest defining __add__ for zope.testing.renormalizing.RENormalizing
which would return a new Checker with the transformers combined.

This allow better reuse of those checkers without having to define the
patterns separately. Like

checker = checker_a + checker_b.

Comments?


--
Christian Zagrodnick · cz[at]gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 4 · fax +49 345 1229889 1
Zope and Plone consulting and development


_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


jim at zope

Jun 18, 2009, 3:45 AM

Post #2 of 3 (370 views)
Permalink
Re: zope.testing: Define __add__ for RENormalizing [In reply to]

On Jun 18, 2009, at 4:00 AM, Christian Zagrodnick wrote:

> Hi,
>
> I suggest defining __add__ for
> zope.testing.renormalizing.RENormalizing
> which would return a new Checker with the transformers combined.
>
> This allow better reuse of those checkers without having to define the
> patterns separately. Like
>
> checker = checker_a + checker_b.
>
> Comments?


+1

Jim

--
Jim Fulton
Zope Corporation


_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


agroszer at gmail

Jun 18, 2009, 4:30 AM

Post #3 of 3 (373 views)
Permalink
Re: zope.testing: Define __add__ for RENormalizing [In reply to]

Hello Christian,

Good idea, see
svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing/testrunner/tests.py

A problem might be at the above case the order of replacements.

Thursday, June 18, 2009, 10:00:01 AM, you wrote:

CZ> Hi,

CZ> I suggest defining __add__ for
CZ> zope.testing.renormalizing.RENormalizing
CZ> which would return a new Checker with the transformers combined.

CZ> This allow better reuse of those checkers without having to define the
CZ> patterns separately. Like

CZ> checker = checker_a + checker_b.

CZ> Comments?




--
Best regards,
Adam GROSZER mailto:agroszer[at]gmail.com
--
Quote of the day:
Strong reasons make strong actions. - Shakespeare

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.