summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-06-12 17:43:43 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-06-12 17:43:43 (GMT)
commit2c849f2f2071560168bc4e08aa119b9b984fddbe (patch)
tree46b8382e3eddc72cdccbe2a0d3a53531e6783114 /Lib
parent26e0f51280af636e63001c6eee8c210a3db0d2c5 (diff)
downloadcpython-2c849f2f2071560168bc4e08aa119b9b984fddbe.zip
cpython-2c849f2f2071560168bc4e08aa119b9b984fddbe.tar.gz
cpython-2c849f2f2071560168bc4e08aa119b9b984fddbe.tar.bz2
Fix test_shlex: Use io.StringIO.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_shlex.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/test/test_shlex.py b/Lib/test/test_shlex.py
index 5c6572a..b18155e 100644
--- a/Lib/test/test_shlex.py
+++ b/Lib/test/test_shlex.py
@@ -1,15 +1,10 @@
# -*- coding: iso-8859-1 -*-
import unittest
-import os, sys
+import os, sys, io
import shlex
from test import test_support
-try:
- from cStringIO import StringIO
-except ImportError:
- from StringIO import StringIO
-
# The original test data set was from shellwords, by Hartmut Goebel.
@@ -160,7 +155,7 @@ class ShlexTest(unittest.TestCase):
def oldSplit(self, s):
ret = []
- lex = shlex.shlex(StringIO(s))
+ lex = shlex.shlex(io.StringIO(s))
tok = lex.get_token()
while tok:
ret.append(tok)