[py-svn] py-trunk commit ee52e1cb604f: merge main
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Sat Apr 24 03:28:29 CEST 2010
# HG changeset patch -- Bitbucket.org
# Project py-trunk
# URL http://bitbucket.org/hpk42/py-trunk/overview
# User Benjamin Peterson <benjamin at python.org>
# Date 1272072512 18000
# Node ID ee52e1cb604f03bba06bcdd137f458b01dba3532
# Parent 4be9b9ce4c62e0cae65debb2e3ec10795c110101
# Parent 5b46c382846322fa7f1701ab749a960aac2d78fe
merge main
--- a/testing/code/test_frame.py
+++ /dev/null
@@ -1,2 +0,0 @@
-import sys
-import py
--- a/testing/io_/test_capture.py
+++ b/testing/io_/test_capture.py
@@ -1,6 +1,8 @@
import os, sys
import py
+needsdup = py.test.mark.skipif("not hasattr(os, 'dup')")
+
from py.builtin import print_
if sys.version_info >= (3,0):
@@ -72,6 +74,7 @@ def pytest_funcarg__tmpfile(request):
request.addfinalizer(f.close)
return f
+ at needsdup
def test_dupfile(tmpfile):
somefile = tmpfile
flist = []
@@ -91,6 +94,8 @@ def test_dupfile(tmpfile):
somefile.close()
class TestFDCapture:
+ pytestmark = needsdup
+
def test_stdout(self, tmpfile):
fd = tmpfile.fileno()
cap = py.io.FDCapture(fd)
@@ -261,6 +266,8 @@ class TestStdCapture:
assert not err
class TestStdCaptureFD(TestStdCapture):
+ pytestmark = needsdup
+
def getcapture(self, **kw):
return py.io.StdCaptureFD(**kw)
@@ -289,6 +296,7 @@ class TestStdCaptureFD(TestStdCapture):
assert out.startswith("3")
assert err.startswith("4")
+ at needsdup
def test_capture_no_sys():
capsys = py.io.StdCapture()
try:
@@ -303,6 +311,7 @@ def test_capture_no_sys():
finally:
capsys.reset()
+ at needsdup
def test_callcapture_nofd():
def func(x, y):
oswritebytes(1, "hello")
More information about the pytest-commit
mailing list