[Python-3000-checkins] r55358 - python/branches/py3k-struni/Lib/test/test_re.py
guido.van.rossum
python-3000-checkins at python.org
Tue May 15 23:40:05 CEST 2007
Author: guido.van.rossum
Date: Tue May 15 23:39:58 2007
New Revision: 55358
Modified:
python/branches/py3k-struni/Lib/test/test_re.py
Log:
Make test_re pass.
Modified: python/branches/py3k-struni/Lib/test/test_re.py
==============================================================================
--- python/branches/py3k-struni/Lib/test/test_re.py (original)
+++ python/branches/py3k-struni/Lib/test/test_re.py Tue May 15 23:39:58 2007
@@ -560,10 +560,6 @@
def test_bug_764548(self):
# bug 764548, re.compile() barfs on str/unicode subclasses
- try:
- str
- except NameError:
- return # no problem if we have no unicode
class my_unicode(str): pass
pat = re.compile(my_unicode("abc"))
self.assertEqual(pat.match("xyz"), None)
@@ -574,19 +570,11 @@
[":", "::", ":::"])
def test_bug_926075(self):
- try:
- str
- except NameError:
- return # no problem if we have no unicode
self.assert_(re.compile('bug_926075') is not
- re.compile(eval("u'bug_926075'")))
+ re.compile(str8('bug_926075')))
def test_bug_931848(self):
- try:
- str
- except NameError:
- pass
- pattern = eval('u"[\u002E\u3002\uFF0E\uFF61]"')
+ pattern = eval('"[\u002E\u3002\uFF0E\uFF61]"')
self.assertEqual(re.compile(pattern).split("a.b.c"),
['a','b','c'])
More information about the Python-3000-checkins
mailing list