From 34d1928766bcae11d8f679a6bf361d9210b6429e Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 9 Aug 2007 01:03:29 +0000 Subject: SF patch# 1770008 by Christian Heimes (plus some extras). Completely get rid of StringIO.py and cStringIO.c. I had to fix a few tests and modules beyond what Christian did, and invent a few conventions. E.g. in elementtree, I chose to write/return Unicode strings whe no encoding is given, but bytes when an explicit encoding is given. Also mimetools was made to always assume binary files. --- Lib/test/test_robotparser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Lib/test/test_robotparser.py') diff --git a/Lib/test/test_robotparser.py b/Lib/test/test_robotparser.py index 666d00ac50..e1e805520a 100644 --- a/Lib/test/test_robotparser.py +++ b/Lib/test/test_robotparser.py @@ -1,4 +1,5 @@ -import unittest, StringIO, robotparser +import unittest, robotparser +import io from test import test_support class RobotTestCase(unittest.TestCase): @@ -32,7 +33,7 @@ tests = unittest.TestSuite() def RobotTest(index, robots_txt, good_urls, bad_urls, agent="test_robotparser"): - lines = StringIO.StringIO(robots_txt).readlines() + lines = io.StringIO(robots_txt).readlines() parser = robotparser.RobotFileParser() parser.parse(lines) for url in good_urls: -- cgit v1.2.1