fixing docs, adding newest ez_setup.py, fixing a few win32 failures, fixing iocapture plugin

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-06-18 19:02:59 +02:00
parent 964ecbdb19
commit 82d40724fa
6 changed files with 27 additions and 13 deletions
+12 -3
View File
@@ -23,9 +23,10 @@ def pytest_funcarg__capfd(request):
return capture
def pytest_pyfunc_call(pyfuncitem):
for funcarg, value in pyfuncitem.funcargs.items():
if funcarg == "capsys" or funcarg == "capfd":
value.reset()
if hasattr(pyfuncitem, 'funcargs'):
for funcarg, value in pyfuncitem.funcargs.items():
if funcarg == "capsys" or funcarg == "capfd":
value.reset()
class Capture:
_capture = None
@@ -62,3 +63,11 @@ class TestCapture:
assert out.startswith("42")
""")
reprec.assertoutcome(passed=1)
def test_funcall_yielded_no_funcargs(self, testdir):
reprec = testdir.inline_runsource("""
def test_hello():
yield lambda: None
""")
reprec.assertoutcome(passed=1)
+3 -2
View File
@@ -3,7 +3,7 @@ funcargs and support code for testing py.test functionality.
"""
import py
import os
import sys, os
import inspect
from py.__.test.config import Config as pytestConfig
import hookspec
@@ -271,7 +271,8 @@ class TmpTestdir:
print "running", cmdargs, "curdir=", py.path.local()
f1 = p1.open("w")
f2 = p2.open("w")
popen = self.popen(cmdargs, stdout=f1, stderr=f2, close_fds=True)
popen = self.popen(cmdargs, stdout=f1, stderr=f2,
close_fds=(sys.platform != "win32"))
ret = popen.wait()
f1.close()
f2.close()