From: Frank C. <fc...@pu...> - 2004-09-28 06:57:25
|
I'm trying to use jUnit, re, and Jython in a test script. Here's how I would like to see the script: from junit.framework import TestCase import re TestCase.assert( "Problem", re.match( "20", "200" ) ) The problem with this code is the re.match function returns None or org.python.modules.sre.MatchObject. This causes TestCase.assert to throw a "2nd arg can't be coerced to boolean" exception. I must be missing something simple but it's late and I'm seeking your help. -Frank --- Frank Cohen, PushToTest, http://www.PushToTest.com, phone: 408 374 7426 Author of "Java Testing and Design: From Unit Tests to Automated Web Tests" from Prentice Hall, details at http://thebook.pushtotest.com |