Login | Register
My pages Projects Community openCollabNet

Discussions > dev > [maxq-dev] Regular expressions in Jython?

maxq
Discussion topic

Back to topic list

[maxq-dev] Regular expressions in Jython?

Author fcohen
Full name Frank Cohen
Date 2004-09-27 22:40:49 PDT
Message Hi Oliver: About your comment:

> If anyone wants to match response codes with a regular expressions
> then they can just change:
>
> self.assertEquals("Assert number 2 failed", 200,
> self.getMethod().get​StatusCode())
>
> to (say)
>
> self.assert(re.match​(r'20[012]', self.getMethod().get​StatusCode()))
>
> Is this sufficient? How would you see that the code would look?


I am unable to get jUnit's TestCase.assert to handle a Jython re
expression. When I process:

assert( re.match( "He", "Hello" ) )

I get an exception: 1st arg cannot be coerced to boolean.

Any ideas why?

-Frank


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe at maxq dot tigris dot org
For additional commands, e-mail: dev-help at maxq dot tigris dot org

« Previous message in topic | 19 of 24 | Next message in topic »

Messages

Show all messages in topic

[maxq-dev] Obese scripts oliverbock Oliver Bock 2004-09-27 14:51:38 PDT
     Re: [maxq-dev] Obese scripts fcohen Frank Cohen 2004-09-27 15:08:32 PDT
         Re: [maxq-dev] Obese scripts fcohen Frank Cohen 2004-09-27 15:21:33 PDT
             Re: [maxq-dev] Obese scripts oliverbock Oliver Bock 2004-09-27 20:59:38 PDT
                 Re: [maxq-dev] Obese scripts fcohen Frank Cohen 2004-09-27 22:14:42 PDT
                 Re: [maxq-dev] Obese scripts bitter lee 2004-09-27 23:37:48 PDT
                     Re: [maxq-dev] Obese scripts oliverbock Oliver Bock 2004-09-29 14:32:39 PDT
                         Re: [maxq-dev] Obese scripts bitter lee 2004-09-29 18:49:38 PDT
                 Re: [maxq-dev] Obese scripts bitter lee 2004-09-27 23:38:33 PDT
                     Re: [maxq-dev] Obese scripts hdara at primavera dot com hdara at primavera dot com 2004-09-28 10:29:04 PDT
                         Re: [maxq-dev] Obese scripts oliverbock Oliver Bock 2004-09-28 14:11:22 PDT
                             Re: [maxq-dev] Obese scripts hdara at primavera dot com hdara at primavera dot com 2004-09-28 14:29:05 PDT
                                 Re: [maxq-dev] Obese scripts oliverbock Oliver Bock 2004-09-28 16:10:32 PDT
                                 Re: [maxq-dev] Obese scripts avery1701 Matt Avery 2004-09-29 07:07:51 PDT
                                     Re: [maxq-dev] Obese scripts avery1701 Matt Avery 2004-09-29 07:49:04 PDT
                                         Re: [maxq-dev] Obese scripts hdara at primavera dot com hdara at primavera dot com 2004-09-29 10:16:43 PDT
         Re: [maxq-dev] Obese scripts oliverbock Oliver Bock 2004-09-27 20:54:23 PDT
             Re: [maxq-dev] Obese scripts fcohen Frank Cohen 2004-09-27 22:10:32 PDT
                 [maxq-dev] Regular expressions in Jython? fcohen Frank Cohen 2004-09-27 22:40:49 PDT
                     Re: [maxq-dev] Regular expressions in Jython? oliverbock Oliver Bock 2004-09-28 14:08:27 PDT
                         Re: [maxq-dev] Regular expressions in Jython? fcohen Frank Cohen 2004-09-28 14:13:34 PDT
     Re: [maxq-dev] Obese scripts hdara at primavera dot com hdara at primavera dot com 2004-09-27 15:26:32 PDT
         Re: [maxq-dev] Obese scripts oliverbock Oliver Bock 2004-09-27 21:00:49 PDT
             Re: [maxq-dev] Obese scripts hdara at primavera dot com hdara at primavera dot com 2004-09-27 22:47:15 PDT
Messages per page: