[Checkins] SVN: gocept.selenium/trunk/ - Allowed to use `regexp` as pattern prefix for regular expressions additionally to `regex` to be compatible with the docstring and the Selenium documentation.
Michael Howitz
mh at gocept.com
Wed Feb 2 15:32:30 EST 2011
Log message for revision 120061:
- Allowed to use `regexp` as pattern prefix for regular expressions additionally to `regex` to be compatible with the docstring and the Selenium documentation.
Changed:
U gocept.selenium/trunk/CHANGES.txt
U gocept.selenium/trunk/src/gocept/selenium/selenese.py
U gocept.selenium/trunk/src/gocept/selenium/tests/test_selenese.py
-=-
Modified: gocept.selenium/trunk/CHANGES.txt
===================================================================
--- gocept.selenium/trunk/CHANGES.txt 2011-02-02 20:31:15 UTC (rev 120060)
+++ gocept.selenium/trunk/CHANGES.txt 2011-02-02 20:32:30 UTC (rev 120061)
@@ -9,7 +9,11 @@
- Wrote a quick start section for packages using ZTK but using
``zope.app.wsgi.testlayer`` instead of ``zope.app.testing``.
+- Allowed to use `regexp` as pattern prefix for regular expressions
+ additionally to `regex` to be compatible with the docstring and the
+ Selenium documentation.
+
0.10 (2011-01-18)
-----------------
Modified: gocept.selenium/trunk/src/gocept/selenium/selenese.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/selenese.py 2011-02-02 20:31:15 UTC (rev 120060)
+++ gocept.selenium/trunk/src/gocept/selenium/selenese.py 2011-02-02 20:32:30 UTC (rev 120061)
@@ -730,6 +730,9 @@
return re.search(pattern, text, re.DOTALL)
+match_regexp = match_regex
+
+
def match_exact(text, pattern):
return text == pattern
Modified: gocept.selenium/trunk/src/gocept/selenium/tests/test_selenese.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/tests/test_selenese.py 2011-02-02 20:31:15 UTC (rev 120060)
+++ gocept.selenium/trunk/src/gocept/selenium/tests/test_selenese.py 2011-02-02 20:32:30 UTC (rev 120061)
@@ -51,6 +51,10 @@
self.assert_(match('foo', 'regex:^fo+$'))
self.assert_(not match('foo', 'regex:^f+$'))
+ def test_regexp(self):
+ self.assert_(match('foo', 'regexp:^fo+$'))
+ self.assert_(not match('foo', 'regexp:^f+$'))
+
def test_multiline_strings(self):
self.assert_(match('foo\nbar', 'glob:foo*'))
self.assert_(match('foo\nbar', 'regex:^foo.*$'))
More information about the checkins
mailing list