diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-06-12 17:43:43 +0000 |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-06-12 17:43:43 +0000 |
commit | f39c672cdf65b8921676be981edf0da886ab442f (patch) | |
tree | 614a1496410b64a53e9eca1e9d7d9f676f9f6466 /Lib/test/test_shlex.py | |
parent | 58b2931a8690781123096e7dede568830176ef20 (diff) | |
download | cpython-f39c672cdf65b8921676be981edf0da886ab442f.tar.gz |
Fix test_shlex: Use io.StringIO.
Diffstat (limited to 'Lib/test/test_shlex.py')
-rw-r--r-- | Lib/test/test_shlex.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/test/test_shlex.py b/Lib/test/test_shlex.py index 5c6572a9ea..b18155e165 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) |