[pypy-commit] pypy default: merge heads
arigo
noreply at buildbot.pypy.org
Sat Apr 28 11:27:53 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r54788:e47c9e33ca61
Date: 2012-04-28 11:27 +0200
http://bitbucket.org/pypy/pypy/changeset/e47c9e33ca61/
Log: merge heads
diff --git a/pypy/module/_multiprocessing/test/test_connection.py b/pypy/module/_multiprocessing/test/test_connection.py
--- a/pypy/module/_multiprocessing/test/test_connection.py
+++ b/pypy/module/_multiprocessing/test/test_connection.py
@@ -157,13 +157,15 @@
raises(IOError, _multiprocessing.Connection, -15)
def test_byte_order(self):
+ import socket
+ if not 'fromfd' in dir(socket):
+ skip('No fromfd in socket')
# The exact format of net strings (length in network byte
# order) is important for interoperation with others
# implementations.
rhandle, whandle = self.make_pair()
whandle.send_bytes("abc")
whandle.send_bytes("defg")
- import socket
sock = socket.fromfd(rhandle.fileno(),
socket.AF_INET, socket.SOCK_STREAM)
data1 = sock.recv(7)
diff --git a/pypy/module/_winreg/test/test_winreg.py b/pypy/module/_winreg/test/test_winreg.py
--- a/pypy/module/_winreg/test/test_winreg.py
+++ b/pypy/module/_winreg/test/test_winreg.py
@@ -198,7 +198,10 @@
import nt
r = ExpandEnvironmentStrings(u"%windir%\\test")
assert isinstance(r, unicode)
- assert r == nt.environ["WINDIR"] + "\\test"
+ if 'WINDIR' in nt.environ.keys():
+ assert r == nt.environ["WINDIR"] + "\\test"
+ else:
+ assert r == nt.environ["windir"] + "\\test"
def test_long_key(self):
from _winreg import (
diff --git a/pypy/module/micronumpy/test/test_dtypes.py b/pypy/module/micronumpy/test/test_dtypes.py
--- a/pypy/module/micronumpy/test/test_dtypes.py
+++ b/pypy/module/micronumpy/test/test_dtypes.py
@@ -185,6 +185,33 @@
assert dtype("float") is dtype(float)
+ def test_index_int8(self):
+ from _numpypy import array, int8
+
+ a = array(range(10), dtype=int8)
+ b = array([0] * 10, dtype=int8)
+ for idx in b: a[idx] += 1
+
+ def test_index_int16(self):
+ from _numpypy import array, int16
+
+ a = array(range(10), dtype=int16)
+ b = array([0] * 10, dtype=int16)
+ for idx in b: a[idx] += 1
+
+ def test_index_int32(self):
+ from _numpypy import array, int32
+
+ a = array(range(10), dtype=int32)
+ b = array([0] * 10, dtype=int32)
+ for idx in b: a[idx] += 1
+
+ def test_index_int64(self):
+ from _numpypy import array, int64
+
+ a = array(range(10), dtype=int64)
+ b = array([0] * 10, dtype=int64)
+ for idx in b: a[idx] += 1
class AppTestTypes(BaseNumpyAppTest):
def test_abstract_types(self):
diff --git a/pypy/module/pypyjit/test_pypy_c/test_00_model.py b/pypy/module/pypyjit/test_pypy_c/test_00_model.py
--- a/pypy/module/pypyjit/test_pypy_c/test_00_model.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_00_model.py
@@ -54,7 +54,8 @@
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
- env={'PYPYLOG': self.log_string + ':' + str(logfile)}
+ env = os.environ.copy()
+ env['PYPYLOG'] = self.log_string + ':' + str(logfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
diff --git a/pypy/module/rctime/interp_time.py b/pypy/module/rctime/interp_time.py
--- a/pypy/module/rctime/interp_time.py
+++ b/pypy/module/rctime/interp_time.py
@@ -572,7 +572,7 @@
if i < length and format[i] == '#':
# not documented by python
i += 1
- if i >= length or format[i] not in "aAbBcdfHIjmMpSUwWxXyYzZ%":
+ if i >= length or format[i] not in "aAbBcdHIjmMpSUwWxXyYzZ%":
raise OperationError(space.w_ValueError,
space.wrap("invalid format string"))
i += 1
diff --git a/pypy/rlib/test/test_rposix.py b/pypy/rlib/test/test_rposix.py
--- a/pypy/rlib/test/test_rposix.py
+++ b/pypy/rlib/test/test_rposix.py
@@ -133,6 +133,8 @@
pass
def test_validate_fd(self):
+ if os.name != 'nt':
+ skip('relevant for windows only')
assert rposix._validate_fd(0) == 1
fid = open(str(udir.join('validate_test.txt')), 'w')
fd = fid.fileno()
More information about the pypy-commit
mailing list