[Python-checkins] r57273 - python/branches/alex-py3k/Lib/test/test_wsgiref.py
alexandre.vassalotti
python-checkins at python.org
Wed Aug 22 01:36:16 CEST 2007
Author: alexandre.vassalotti
Date: Wed Aug 22 01:36:16 2007
New Revision: 57273
Modified:
python/branches/alex-py3k/Lib/test/test_wsgiref.py
Log:
Fix failing test.
Add MockFile class -- a StringIO subclass which close() set the
closed property to True.
Modified: python/branches/alex-py3k/Lib/test/test_wsgiref.py
==============================================================================
--- python/branches/alex-py3k/Lib/test/test_wsgiref.py (original)
+++ python/branches/alex-py3k/Lib/test/test_wsgiref.py Wed Aug 22 01:36:16 2007
@@ -36,6 +36,10 @@
def finish(self):
pass
+class MockFile(StringIO):
+ closed = False
+ def close(self):
+ self.closed = True
@@ -209,7 +213,7 @@
def checkFW(self,text,size,match):
def make_it(text=text,size=size):
- return util.FileWrapper(StringIO(text),size)
+ return util.FileWrapper(MockFile(text),size)
compare_generic_iter(make_it,match)
More information about the Python-checkins
mailing list