[py-svn] py-trunk commit 319187fcda66: adjustments and fixes to test run, distribution files. thanks thm.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Nov 24 18:04:46 CET 2009


# HG changeset patch -- Bitbucket.org
# Project py-trunk
# URL http://bitbucket.org/hpk42/py-trunk/overview/
# User holger krekel <holger at merlinux.eu>
# Date 1259072218 -3600
# Node ID 319187fcda66714c5eb1353492babeec3d3c826f
# Parent 1c31b7e6dde204243118244ee1f108912d37cb12
adjustments and fixes to test run, distribution files. thanks thm.

--- a/testing/plugin/test_pytest_restdoc.py
+++ b/testing/plugin/test_pytest_restdoc.py
@@ -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

--- a/doc/example/assertion/global_testmodule_config/conftest.py
+++ b/doc/example/assertion/global_testmodule_config/conftest.py
@@ -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)

--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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
 

--- a/testing/plugin/test_pytest_terminal.py
+++ b/testing/plugin/test_pytest_terminal.py
@@ -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'>

--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -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 

--- a/py/plugin/pytest_pytester.py
+++ b/py/plugin/pytest_pytester.py
@@ -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)

--- a/testing/path/test_svnauth.py
+++ b/testing/path/test_svnauth.py
@@ -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')
 

--- a/doc/announce/release-1.1.1.txt
+++ b/doc/announce/release-1.1.1.txt
@@ -3,9 +3,9 @@ py.test/pylib 1.1.1: bugfix release, set
 
 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
-



More information about the pytest-commit mailing list