adjustments and fixes to test run, distribution files. thanks thm.

--HG--
branch : trunk
This commit is contained in:
holger krekel 2009-11-24 15:16:58 +01:00
parent 8c6593cc08
commit 9d5b313aad
8 changed files with 27 additions and 10 deletions

View File

@ -1,8 +1,8 @@
Changes between 1.1.1 and 1.1.0
=====================================
- introduce automatic lookup of 'pytest11' entrypoints
via setuptools' pkg_resources.iter_entry_points
- introduce automatic plugin registration via 'pytest11'
entrypoints via setuptools' pkg_resources.iter_entry_points
- fix py.test dist-testing to work with execnet >= 1.0.0b4
@ -12,6 +12,8 @@ Changes between 1.1.1 and 1.1.0
allow '%' in svn paths, make svnwc.update() default to interactive mode
like in 1.0.x and add svnwc.update(interactive=False) to inhibit interaction.
- refine distributed tarball to contain test and no pyc files
- try harder to have deprecation warnings for py.compat.* accesses
report a correct location

View File

@ -3,11 +3,16 @@ include README.txt
include setup.py
include distribute_setup.py
include LICENSE
include conftest.py
graft doc
graft contrib
graft bin
graft testing
exclude *.orig
exclude *.rej
exclude .hginore
exclude *.pyc
recursive-exclude testing *.pyc *.orig *.rej *$py.class
prune .pyc
prune .svn
prune .hg

View File

@ -3,9 +3,9 @@ py.test/pylib 1.1.1: bugfix release, setuptools plugin registration
This is a compatibility fixing release of pylib/py.test to work
better with previous 1.0.x test code bases. It also contains fixes
and changes to work with `execnet>=1.0.0b4`_. 1.1.1 also introduces
and changes to work with `execnet>=1.0.0`_ to provide distributed
testing and looponfailing testing modes. py-1.1.1 also introduces
a new mechanism for registering plugins via setuptools.
Last but not least, documentation has been improved.
What is pylib/py.test?
-----------------------
@ -26,13 +26,13 @@ have fun,
holger (http://twitter.com/hpk42)
.. _`execnet>=1.0.0b4`: http://codespeak.net/execnet
.. _`execnet>=1.0.0`: http://codespeak.net/execnet
Changes between 1.1.1 and 1.1.0
=====================================
- introduce automatic lookup of 'pytest11' entrypoints
via setuptools' pkg_resources.iter_entry_points
- introduce automatic plugin registration via 'pytest11'
entrypoints via setuptools' pkg_resources.iter_entry_points
- fix py.test dist-testing to work with execnet >= 1.0.0b4
@ -42,6 +42,7 @@ Changes between 1.1.1 and 1.1.0
allow '%' in svn paths, make svnwc.update() default to interactive mode
like in 1.0.x and add svnwc.update(interactive=False) to inhibit interaction.
- refine distributed tarball to contain test and no pyc files
- try harder to have deprecation warnings for py.compat.* accesses
report a correct location

View File

@ -1,7 +1,10 @@
import py
mydir = py.path.local(__file__).dirpath()
def pytest_runtest_setup(item):
if isinstance(item, py.test.collect.Function):
if not item.fspath.relto(mydir):
return
mod = item.getparent(py.test.collect.Module).obj
if hasattr(mod, 'hello'):
py.builtin.print_("mod.hello", mod.hello)

View File

@ -319,7 +319,7 @@ class TmpTestdir:
return self.runpybin("py.test", *args)
def spawn_pytest(self, string, expect_timeout=10.0):
pexpect = py.test.importorskip("pexpect", "2.3")
pexpect = py.test.importorskip("pexpect", "2.4")
basetemp = self.tmpdir.mkdir("pexpect")
invoke = "%s %s" % self._getpybinargs("py.test")
cmd = "%s --basetemp=%s %s" % (invoke, basetemp, string)

View File

@ -4,6 +4,8 @@ from py.path import SvnAuth
import time
import sys
svnbin = py.path.local.sysfind('svn')
def make_repo_auth(repo, userdata):
""" write config to repo
@ -257,6 +259,8 @@ class TestSvnURLAuth(object):
class pytest_funcarg__setup:
def __init__(self, request):
if not svnbin:
py.test.skip("svn binary required")
if not request.config.option.runslowtests:
py.test.skip('use --runslowtests to run these tests')

View File

@ -47,6 +47,9 @@ class TestDoctest:
assert request.module.__name__ == __name__
testdir.makepyfile(confrest=
"from py.plugin.pytest_restdoc import Project")
# we scope our confrest file so that it doesn't
# conflict with another global confrest.py
testdir.makepyfile(__init__="")
for p in testdir.plugins:
if p == globals():
break

View File

@ -374,7 +374,6 @@ class TestCollectonly:
p = testdir.makepyfile("import Errlkjqweqwe")
result = testdir.runpytest("--collectonly", p)
stderr = result.stderr.str().strip()
assert stderr.startswith("inserting into sys.path")
assert result.ret == 1
extra = result.stdout.fnmatch_lines(py.code.Source("""
<Module '*.py'>