[py-svn] r64077 - in py/trunk: . py/execnet/testing
hpk at codespeak.net
hpk at codespeak.net
Tue Apr 14 23:04:58 CEST 2009
Author: hpk
Date: Tue Apr 14 23:04:57 2009
New Revision: 64077
Modified:
py/trunk/CHANGELOG
py/trunk/MANIFEST
py/trunk/py/execnet/testing/test_gwmanage.py
py/trunk/setup.py
Log:
sync from hg-trunk
Modified: py/trunk/CHANGELOG
==============================================================================
--- py/trunk/CHANGELOG (original)
+++ py/trunk/CHANGELOG Tue Apr 14 23:04:57 2009
@@ -3,13 +3,20 @@
Changes between 0.9.2 and 1.0 (UNRELEASED)
=============================================
+* introduced new "funcarg" setup method,
+ see doc/test/funcarg.txt
+
+* introduced plugin architecuture and many
+ new py.test plugins, see
+ doc/test/plugins.txt
+
* teardown_method is now guaranteed to get
called after a test method has run.
* new method: py.test.importorskip(mod,minversion)
will either import or call py.test.skip()
-* revised internal py.test architecture
+* completely revised internal py.test architecture
* new py.process.ForkedFunc object allowing to
fork execution of a function to a sub process
Modified: py/trunk/MANIFEST
==============================================================================
--- py/trunk/MANIFEST (original)
+++ py/trunk/MANIFEST Tue Apr 14 23:04:57 2009
@@ -4,7 +4,6 @@
MANIFEST
README.txt
TODO.txt
-ez_setup.py
py/LICENSE
py/__init__.py
py/_com.py
@@ -297,6 +296,7 @@
py/test/testing/test_config.py
py/test/testing/test_conftesthandle.py
py/test/testing/test_deprecated_api.py
+py/test/testing/test_funcargs.py
py/test/testing/test_genitems.py
py/test/testing/test_outcome.py
py/test/testing/test_parseopt.py
Modified: py/trunk/py/execnet/testing/test_gwmanage.py
==============================================================================
--- py/trunk/py/execnet/testing/test_gwmanage.py (original)
+++ py/trunk/py/execnet/testing/test_gwmanage.py Tue Apr 14 23:04:57 2009
@@ -33,7 +33,8 @@
hm.exit()
assert not len(hm.gateways)
- def test_popens_rsync(self, source):
+ def test_popens_rsync(self, mysetup):
+ source = mysetup.source
hm = GatewayManager(["popen"] * 2)
hm.makegateways()
assert len(hm.gateways) == 2
@@ -45,7 +46,8 @@
hm.exit()
assert not len(hm.gateways)
- def test_rsync_popen_with_path(self, source, dest):
+ def test_rsync_popen_with_path(self, mysetup):
+ source, dest = mysetup.source, mysetup.dest
hm = GatewayManager(["popen//chdir=%s" %dest] * 1)
hm.makegateways()
source.ensure("dir1", "dir2", "hello")
@@ -59,7 +61,8 @@
assert dest.join("dir1", "dir2").check()
assert dest.join("dir1", "dir2", 'hello').check()
- def test_hostmanage_rsync_same_popen_twice(self, source, dest, _pytest):
+ def test_hostmanage_rsync_same_popen_twice(self, mysetup, _pytest):
+ source, dest = mysetup.source, mysetup.dest
rec = _pytest.getcallrecorder(py.execnet._API)
hm = GatewayManager(["popen//chdir=%s" %dest] * 2)
hm.makegateways()
@@ -109,13 +112,15 @@
assert l[0].startswith(curwd)
assert l[0].endswith("hello")
-def pytest_funcarg__source(pyfuncitem):
- return py.test.ensuretemp(pyfuncitem.getmodpath()).mkdir("source")
-def pytest_funcarg__dest(pyfuncitem):
- return py.test.ensuretemp(pyfuncitem.getmodpath()).mkdir("dest")
+class pytest_funcarg__mysetup:
+ def __init__(self, request):
+ tmp = request.maketempdir()
+ self.source = tmp.mkdir("source")
+ self.dest = tmp.mkdir("dest")
class TestHRSync:
- def test_hrsync_filter(self, source, dest):
+ def test_hrsync_filter(self, mysetup):
+ source, dest = mysetup.source, mysetup.dest
source.ensure("dir", "file.txt")
source.ensure(".svn", "entries")
source.ensure(".somedotfile", "moreentries")
@@ -129,7 +134,8 @@
assert 'file.txt' in basenames
assert 'somedir' in basenames
- def test_hrsync_one_host(self, source, dest):
+ def test_hrsync_one_host(self, mysetup):
+ source, dest = mysetup.source, mysetup.dest
gw = py.execnet.makegateway("popen//chdir=%s" % dest)
finished = []
rsync = HostRSync(source)
Modified: py/trunk/setup.py
==============================================================================
--- py/trunk/setup.py (original)
+++ py/trunk/setup.py Tue Apr 14 23:04:57 2009
@@ -1,7 +1,7 @@
"""
setup file for 'py' package based on:
- https://codespeak.net/svn/py/trunk, revision=63999
+ https://codespeak.net/svn/py/trunk, revision=64076
autogenerated by gensetup.py
"""
More information about the pytest-commit
mailing list