[py-svn] r57173 - in py/branch/event/py/test2: dist/testing testing

hpk at codespeak.net hpk at codespeak.net
Sun Aug 10 19:04:13 CEST 2008


Author: hpk
Date: Sun Aug 10 19:04:12 2008
New Revision: 57173

Modified:
   py/branch/event/py/test2/dist/testing/test_functional_dsession.py
   py/branch/event/py/test2/testing/test_runner_functional.py
Log:
platform skips


Modified: py/branch/event/py/test2/dist/testing/test_functional_dsession.py
==============================================================================
--- py/branch/event/py/test2/dist/testing/test_functional_dsession.py	(original)
+++ py/branch/event/py/test2/dist/testing/test_functional_dsession.py	Sun Aug 10 19:04:12 2008
@@ -8,6 +8,7 @@
 from py.__.test2.dist.hostmanage import HostManager, Host
 from basetest import BasicRsessionTest, DirSetup
 from py.__.test2.testing import suptest
+import os
 
 def eventreader(session):
     queue = py.std.Queue.Queue()
@@ -105,6 +106,8 @@
 
     def test_nice_level(self):
         """ Tests if nice level behaviour is ok """
+        if not hasattr(os, 'nice'):
+            py.test.skip("no os.nice() available")
         self.makepyfile(conftest="""
                 dist_hosts=['localhost']
                 dist_nicelevel = 10

Modified: py/branch/event/py/test2/testing/test_runner_functional.py
==============================================================================
--- py/branch/event/py/test2/testing/test_runner_functional.py	(original)
+++ py/branch/event/py/test2/testing/test_runner_functional.py	Sun Aug 10 19:04:12 2008
@@ -210,6 +210,8 @@
 
 class TestExecutionForked(BaseTests): 
     def getrunner(self):
+        if not hasattr(py.std.os, 'fork'):
+            py.test.skip("no os.fork available")
         return forked_run_report
 
     def test_suicide(self):



More information about the pytest-commit mailing list