summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_re.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-15 21:39:58 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-15 21:39:58 (GMT)
commit7ebb970615a039678e9b02579697fc461601fe86 (patch)
tree3af261f7e0d7a455daa4407d2987ae24dfe4b5f8 /Lib/test/test_re.py
parente1083734ec19709a9c30f8df93e61fb079e93d8d (diff)
downloadcpython-7ebb970615a039678e9b02579697fc461601fe86.zip
cpython-7ebb970615a039678e9b02579697fc461601fe86.tar.gz
cpython-7ebb970615a039678e9b02579697fc461601fe86.tar.bz2
Make test_re pass.
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r--Lib/test/test_re.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index b6dfea8..1f4505f 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -560,10 +560,6 @@ class ReTests(unittest.TestCase):
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 @@ class ReTests(unittest.TestCase):
[":", "::", ":::"])
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'])