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@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
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
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@gmail.com -- Quote of the day: Strong reasons make strong actions. - Shakespeare
On 2009-06-18 10:00:01 +0200, Christian Zagrodnick <cz@gocept.com> said:
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.
Finally got that in: r106221. -- Christian Zagrodnick · cz@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
participants (3)
-
Adam GROSZER -
Christian Zagrodnick -
Jim Fulton