[pypy-commit] pypy default: skip these tests if not running on unix
bdkearns
noreply at buildbot.pypy.org
Tue Jan 29 00:48:07 CET 2013
Author: Brian Kearns <bdkearns at gmail.com>
Branch:
Changeset: r60642:45879262d4c1
Date: 2013-01-28 18:47 -0500
http://bitbucket.org/pypy/pypy/changeset/45879262d4c1/
Log: skip these tests if not running on unix
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,11 @@
+import os, 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,8 @@
-import os
+import os, 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/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,8 @@
+import os, 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,11 @@
-
import py
-import sys
+import sys, os
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:
More information about the pypy-commit
mailing list