[Python-3000-checkins] r55935 - python/branches/py3k-struni/Lib/test/test_shlex.py
walter.doerwald
python-3000-checkins at python.org
Tue Jun 12 19:43:48 CEST 2007
Author: walter.doerwald
Date: Tue Jun 12 19:43:43 2007
New Revision: 55935
Modified:
python/branches/py3k-struni/Lib/test/test_shlex.py
Log:
Fix test_shlex: Use io.StringIO.
Modified: python/branches/py3k-struni/Lib/test/test_shlex.py
==============================================================================
--- python/branches/py3k-struni/Lib/test/test_shlex.py (original)
+++ python/branches/py3k-struni/Lib/test/test_shlex.py Tue Jun 12 19:43:43 2007
@@ -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 @@
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)
More information about the Python-3000-checkins
mailing list