[pypy-svn] r60961 - pypy/trunk/pypy/module/_file/test
fijal at codespeak.net
fijal at codespeak.net
Wed Jan 14 15:58:40 CET 2009
Author: fijal
Date: Wed Jan 14 15:58:37 2009
New Revision: 60961
Modified:
pypy/trunk/pypy/module/_file/test/test_file.py
Log:
A failing test for mixed readline and normal read
Modified: pypy/trunk/pypy/module/_file/test/test_file.py
==============================================================================
--- pypy/trunk/pypy/module/_file/test/test_file.py (original)
+++ pypy/trunk/pypy/module/_file/test/test_file.py Wed Jan 14 15:58:37 2009
@@ -125,6 +125,31 @@
assert type(res) is str
f.close()
+
+ def test_readline_mixed_with_read(self):
+ skip("fails")
+ s = '''From MAILER-DAEMON Wed Jan 14 14:42:30 2009
+From: foo
+
+0
+From MAILER-DAEMON Wed Jan 14 14:42:44 2009
+Return-Path: <gkj at gregorykjohnson.com>
+X-Original-To: gkj+person at localhost
+Delivered-To: gkj+person at localhost
+Received: from localhost (localhost [127.0.0.1])
+ by andy.gregorykjohnson.com (Postfix) with ESMTP id 356ED9DD17
+ for <gkj+person at localhost>; Wed, 13 Jul 2005 17:23:16 -0400 (EDT)
+Delivered-To: gkj at sundance.gregorykjohnson.com'''
+ f = self.file(self.temppath, "w")
+ f.write(s)
+ f.close()
+ f = self.file(self.temppath, "r")
+ f.seek(0L)
+ f.readline()
+ assert f.tell() == 44L
+ assert f.read(12L) == 'From: foo\n\n0'
+ f.close()
+
class AppTestConcurrency(object):
# these tests only really make sense on top of a translated pypy-c,
# because on top of py.py the inner calls to os.write() don't
@@ -255,7 +280,6 @@
assert s == "foo"
assert f.closed
-
def test_flush_at_exit():
from pypy import conftest
from pypy.tool.option import make_config, make_objspace
More information about the Pypy-commit
mailing list