summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_iter.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-05-22 16:52:54 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-05-22 16:52:54 (GMT)
commit1f5947b30a870008ebd2367b2f4f9a5897f657c9 (patch)
tree2a881cb9b9dcfeaa1e96dc0905f0a9b56993caca /Lib/test/test_iter.py
parent02427050c187ba54649c7ad16b35370c31a0b238 (diff)
downloadcpython-1f5947b30a870008ebd2367b2f4f9a5897f657c9.zip
cpython-1f5947b30a870008ebd2367b2f4f9a5897f657c9.tar.gz
cpython-1f5947b30a870008ebd2367b2f4f9a5897f657c9.tar.bz2
Remove have_unicode checks and merge those tests into the
normal code (or drop them if they only repeat previous tests).
Diffstat (limited to 'Lib/test/test_iter.py')
-rw-r--r--Lib/test/test_iter.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/Lib/test/test_iter.py b/Lib/test/test_iter.py
index 22595fc..42d4e3e 100644
--- a/Lib/test/test_iter.py
+++ b/Lib/test/test_iter.py
@@ -1,7 +1,7 @@
# Test iterators.
import unittest
-from test.test_support import run_unittest, TESTFN, unlink, have_unicode
+from test.test_support import run_unittest, TESTFN, unlink
# Test result of triple loop (too big to inline)
TRIPLETS = [(0, 0, 0), (0, 0, 1), (0, 0, 2),
@@ -213,13 +213,6 @@ class TestCase(unittest.TestCase):
def test_iter_string(self):
self.check_for_loop(iter("abcde"), ["a", "b", "c", "d", "e"])
- # Test a Unicode string
- if have_unicode:
- def test_iter_unicode(self):
- self.check_for_loop(iter(str("abcde")),
- [str("a"), str("b"), str("c"),
- str("d"), str("e")])
-
# Test a directory
def test_iter_dict(self):
dict = {}
@@ -500,7 +493,6 @@ class TestCase(unittest.TestCase):
for y in NoGuessLen5(), Guess3Len5(), Guess30Len5():
self.assertEqual(lzip(x, y), expected)
- # This test case will be removed if we don't have Unicode
def test_unicode_join_endcase(self):
# This class inserts a Unicode object into its argument's natural
@@ -517,7 +509,7 @@ class TestCase(unittest.TestCase):
i = self.i
self.i = i+1
if i == 2:
- return str("fooled you!")
+ return "fooled you!"
return next(self.it)
f = open(TESTFN, "w")
@@ -541,8 +533,6 @@ class TestCase(unittest.TestCase):
unlink(TESTFN)
except OSError:
pass
- if not have_unicode:
- def test_unicode_join_endcase(self): pass
# Test iterators with 'x in y' and 'x not in y'.
def test_in_and_not_in(self):