Author: Alex Gaynor <[email protected]>
Branch:
Changeset: r60590:39bc105d07db
Date: 2013-01-28 01:04 -0800
http://bitbucket.org/pypy/pypy/changeset/39bc105d07db/
Log: merged upstream
diff --git a/pypy/module/_file/test/test_file.py
b/pypy/module/_file/test/test_file.py
--- a/pypy/module/_file/test/test_file.py
+++ b/pypy/module/_file/test/test_file.py
@@ -430,7 +430,7 @@
assert f.subclass_closed
def test_readline_unbuffered_should_read_one_line_only(self):
- import posix
+ import os
with self.file(self.temppath, 'w') as f:
f.write('foo\nbar\n')
@@ -438,7 +438,7 @@
with self.file(self.temppath, 'r', 0) as f:
s = f.readline()
assert s == 'foo\n'
- s = posix.read(f.fileno(), 10)
+ s = os.read(f.fileno(), 10)
assert s == 'bar\n'
def test_flush_at_exit():
diff --git a/pypy/module/_file/test/test_file_extra.py
b/pypy/module/_file/test/test_file_extra.py
--- a/pypy/module/_file/test/test_file_extra.py
+++ b/pypy/module/_file/test/test_file_extra.py
@@ -612,6 +612,7 @@
repr(unicode(self.temptestfile)))
f.close()
+ @py.test.mark.skipif("os.name != 'posix'")
def test_EAGAIN(self):
import _socket, posix
s1, s2 = _socket.socketpair()
diff --git a/pypy/module/rctime/test/test_rctime.py
b/pypy/module/rctime/test/test_rctime.py
--- a/pypy/module/rctime/test/test_rctime.py
+++ b/pypy/module/rctime/test/test_rctime.py
@@ -114,7 +114,10 @@
assert rctime.mktime(rctime.localtime(-1)) == -1
res = rctime.mktime((2000, 1, 1, 0, 0, 0, -1, -1, -1))
- assert rctime.ctime(res) == 'Sat Jan 1 00:00:00 2000'
+ if os.name == 'nt':
+ assert rctime.ctime(res) == 'Sat Jan 01 00:00:00 2000'
+ else:
+ assert rctime.ctime(res) == 'Sat Jan 1 00:00:00 2000'
def test_asctime(self):
import time as rctime
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit