Author: Brian Kearns <[email protected]>
Branch: py3k
Changeset: r60654:80098444cbc8
Date: 2013-01-29 02:14 -0500
http://bitbucket.org/pypy/pypy/changeset/80098444cbc8/
Log: merge default
diff --git a/lib-python/conftest.py b/lib-python/conftest.py
--- a/lib-python/conftest.py
+++ b/lib-python/conftest.py
@@ -61,7 +61,8 @@
usemodules = '',
skip=None):
self.basename = basename
- self._usemodules = usemodules.split() + ['signal', '_warnings']
+ self._usemodules = usemodules.split() + ['signal', 'rctime',
'binascii', '_socket',
+ 'select', 'fcntl', '_posixsubprocess']
self._compiler = compiler
self.core = core
self.skip = skip
@@ -103,19 +104,19 @@
testmap = [
RegrTest('test___all__.py', core=True),
RegrTest('test___future__.py', core=True),
- RegrTest('test__locale.py', skip=skip_win32),
+ RegrTest('test__locale.py', usemodules='_locale', skip=skip_win32),
RegrTest('test_abc.py'),
RegrTest('test_abstract_numbers.py'),
RegrTest('test_aifc.py'),
- RegrTest('test_argparse.py'),
- RegrTest('test_array.py', core=True, usemodules='struct array'),
- RegrTest('test_ast.py', core=True),
- RegrTest('test_asynchat.py', usemodules='thread'),
- RegrTest('test_asyncore.py'),
+ RegrTest('test_argparse.py', usemodules='binascii'),
+ RegrTest('test_array.py', core=True, usemodules='struct array binascii'),
+ RegrTest('test_ast.py', core=True, usemodules='struct'),
+ RegrTest('test_asynchat.py', usemodules='select fcntl'),
+ RegrTest('test_asyncore.py', usemodules='select fcntl'),
RegrTest('test_atexit.py', core=True),
RegrTest('test_audioop.py', skip=True),
RegrTest('test_augassign.py', core=True),
- RegrTest('test_base64.py'),
+ RegrTest('test_base64.py', usemodules='struct'),
RegrTest('test_bigaddrspace.py'),
RegrTest('test_bigmem.py'),
RegrTest('test_binascii.py', usemodules='binascii'),
@@ -124,8 +125,8 @@
RegrTest('test_bisect.py', core=True, usemodules='_bisect'),
RegrTest('test_bool.py', core=True),
RegrTest('test_bufio.py', core=True),
- RegrTest('test_builtin.py', core=True),
- RegrTest('test_bytes.py'),
+ RegrTest('test_builtin.py', core=True, usemodules='binascii'),
+ RegrTest('test_bytes.py', usemodules='struct binascii'),
RegrTest('test_bz2.py', usemodules='bz2'),
RegrTest('test_calendar.py'),
RegrTest('test_call.py', core=True),
@@ -371,7 +372,7 @@
RegrTest('test_sort.py', core=True),
RegrTest('test_sqlite.py', usemodules="thread _rawffi zlib"),
RegrTest('test_ssl.py', usemodules='_ssl _socket select'),
- RegrTest('test_startfile.py'), # skip="bogus test"?
+ RegrTest('test_startfile.py'),
RegrTest('test_strftime.py'),
RegrTest('test_string.py', core=True),
RegrTest('test_stringprep.py'),
@@ -461,6 +462,7 @@
def check_testmap_complete():
listed_names = dict.fromkeys([regrtest.basename for regrtest in testmap])
+ assert len(listed_names) == len(testmap)
listed_names['test_support.py'] = True # ignore this
missing = []
for path in testdir.listdir(fil='test_*.py'):
@@ -516,7 +518,7 @@
def getinvocation(self, regrtest):
fspath = regrtest.getfspath()
python = sys.executable
- pypy_script = pypydir.join('bin', 'py.py')
+ pypy_script = pypydir.join('bin', 'pyinteractive.py')
alarm_script = pypydir.join('tool', 'alarm.py')
if sys.platform == 'win32':
watchdog_name = 'watchdog_nt.py'
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
@@ -67,7 +67,7 @@
assert rhandle.readable
class AppTestWinpipeConnection(BaseConnectionTest):
- spaceconfig = dict(usemodules=('_multiprocessing', 'thread'))
+ spaceconfig = dict(usemodules=('_multiprocessing', 'thread', 'signal'))
def setup_class(cls):
if sys.platform != "win32":
diff --git a/pypy/module/crypt/test/test_crypt.py
b/pypy/module/crypt/test/test_crypt.py
--- a/pypy/module/crypt/test/test_crypt.py
+++ b/pypy/module/crypt/test/test_crypt.py
@@ -1,6 +1,12 @@
+import os
+import py
+
+if os.name != 'posix':
+ py.test.skip('crypt module only available on unix')
+
class AppTestCrypt:
spaceconfig = dict(usemodules=['crypt'])
-
+
def test_crypt(self):
import crypt
res = crypt.crypt("pass", "ab")
diff --git a/pypy/module/fcntl/test/test_fcntl.py
b/pypy/module/fcntl/test/test_fcntl.py
--- a/pypy/module/fcntl/test/test_fcntl.py
+++ b/pypy/module/fcntl/test/test_fcntl.py
@@ -1,9 +1,9 @@
import os
+import py
from rpython.tool.udir import udir
-if os.name == "nt":
- from py.test import skip
- skip("fcntl module is not available on Windows")
+if os.name != 'posix':
+ py.test.skip("fcntl module only available on unix")
def teardown_module(mod):
for i in "abcde":
diff --git a/pypy/module/posix/test/test_posix2.py
b/pypy/module/posix/test/test_posix2.py
--- a/pypy/module/posix/test/test_posix2.py
+++ b/pypy/module/posix/test/test_posix2.py
@@ -797,14 +797,19 @@
if hasattr(os, 'chmod'):
def test_chmod(self):
+ import sys
os = self.posix
os.unlink(self.path)
raises(OSError, os.chmod, self.path, 0o600)
f = open(self.path, "w")
f.write("this is a test")
f.close()
- os.chmod(self.path, 0o200)
- assert (os.stat(self.path).st_mode & 0o777) == 0o200
+ if sys.platform == 'win32':
+ os.chmod(self.path, 0o400)
+ assert (os.stat(self.path).st_mode & 0o600) == 0o400
+ else:
+ os.chmod(self.path, 0o200)
+ assert (os.stat(self.path).st_mode & 0o777) == 0o200
if hasattr(os, 'fchmod'):
def test_fchmod(self):
diff --git a/pypy/module/pwd/test/test_pwd.py b/pypy/module/pwd/test/test_pwd.py
--- a/pypy/module/pwd/test/test_pwd.py
+++ b/pypy/module/pwd/test/test_pwd.py
@@ -1,3 +1,9 @@
+import os
+import py
+
+if os.name != 'posix':
+ py.test.skip('pwd module only available on unix')
+
class AppTestPwd:
spaceconfig = dict(usemodules=['pwd'])
diff --git a/pypy/module/termios/test/test_termios.py
b/pypy/module/termios/test/test_termios.py
--- a/pypy/module/termios/test/test_termios.py
+++ b/pypy/module/termios/test/test_termios.py
@@ -1,9 +1,12 @@
-
+import os
+import sys
import py
-import sys
from pypy.conftest import pypydir
from rpython.tool.udir import udir
+if os.name != 'posix':
+ py.test.skip('termios module only available on unix')
+
class TestTermios(object):
def setup_class(cls):
try:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit