regen MANIFEST, update changelog

--HG--
branch : 1.0.x
This commit is contained in:
holger krekel 2009-07-22 14:58:05 +02:00
parent 155ffa07de
commit 87daedd719
19 changed files with 156 additions and 22 deletions

View File

@ -1,10 +1,10 @@
Changes between 1.0.0b7 and 1.0.0b8 Changes between 1.0.0b7 and 1.0.0b8
===================================== =====================================
* pytest_unittest-plugin are now enabled by default * pytest_unittest-plugin is now enabled by default
* introduced pytest_keyboardinterrupt hook and * introduced pytest_keyboardinterrupt hook and
refined pytest_sessionfinish hooked. refined pytest_sessionfinish hooked, added tests.
* workaround a buggy logging module interaction ("closing already closed * workaround a buggy logging module interaction ("closing already closed
files"). Thanks to Sridhar Ratnakumar for triggering. files"). Thanks to Sridhar Ratnakumar for triggering.
@ -13,9 +13,8 @@ Changes between 1.0.0b7 and 1.0.0b8
a dependency only a warning will be issued instead a dependency only a warning will be issued instead
of exiting the testing process. of exiting the testing process.
* docs: * many improvements to docs:
- refined funcargs doc , use the term "factory" instead - refined funcargs doc , use the term "factory" instead of "provider"
of "provider"
- added a new talk/tutorial doc page - added a new talk/tutorial doc page
- better download page - better download page
- better plugin docstrings - better plugin docstrings

View File

@ -28,7 +28,25 @@ doc/test/examples.txt
doc/test/extend.txt doc/test/extend.txt
doc/test/features.txt doc/test/features.txt
doc/test/funcargs.txt doc/test/funcargs.txt
doc/test/plugins.txt doc/test/plugin/doctest.txt
doc/test/plugin/execnetcleanup.txt
doc/test/plugin/figleaf.txt
doc/test/plugin/hooklog.txt
doc/test/plugin/hookspec.txt
doc/test/plugin/index.txt
doc/test/plugin/iocapture.txt
doc/test/plugin/keyword.txt
doc/test/plugin/monkeypatch.txt
doc/test/plugin/pdb.txt
doc/test/plugin/pocoo.txt
doc/test/plugin/pytester.txt
doc/test/plugin/recwarn.txt
doc/test/plugin/restdoc.txt
doc/test/plugin/resultlog.txt
doc/test/plugin/runner.txt
doc/test/plugin/terminal.txt
doc/test/plugin/unittest.txt
doc/test/plugin/xfail.txt
doc/test/quickstart.txt doc/test/quickstart.txt
doc/test/talks.txt doc/test/talks.txt
doc/test/test.txt doc/test/test.txt
@ -340,6 +358,7 @@ py/test/plugin/pytest_unittest.py
py/test/plugin/pytest_xfail.py py/test/plugin/pytest_xfail.py
py/test/plugin/test_pytest_runner.py py/test/plugin/test_pytest_runner.py
py/test/plugin/test_pytest_runner_xunit.py py/test/plugin/test_pytest_runner_xunit.py
py/test/plugin/test_pytest_terminal.py
py/test/pluginmanager.py py/test/pluginmanager.py
py/test/pycollect.py py/test/pycollect.py
py/test/session.py py/test/session.py
@ -358,6 +377,7 @@ py/test/testing/test_conftesthandle.py
py/test/testing/test_deprecated_api.py py/test/testing/test_deprecated_api.py
py/test/testing/test_funcargs.py py/test/testing/test_funcargs.py
py/test/testing/test_genitems.py py/test/testing/test_genitems.py
py/test/testing/test_install.py
py/test/testing/test_outcome.py py/test/testing/test_outcome.py
py/test/testing/test_parseopt.py py/test/testing/test_parseopt.py
py/test/testing/test_pickling.py py/test/testing/test_pickling.py

View File

@ -233,7 +233,7 @@ For your convenience here is also an inlined version of ``pytest_doctest.py``:
"*test_txtfile_failing.txt:2: DocTestFailure" "*test_txtfile_failing.txt:2: DocTestFailure"
]) ])
.. _`pytest_doctest.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_doctest.py .. _`pytest_doctest.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_doctest.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -79,7 +79,7 @@ For your convenience here is also an inlined version of ``pytest_execnetcleanup.
""", "-s", "--debug") """, "-s", "--debug")
reprec.assertoutcome(passed=2) reprec.assertoutcome(passed=2)
.. _`pytest_execnetcleanup.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_execnetcleanup.py .. _`pytest_execnetcleanup.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_execnetcleanup.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -103,7 +103,7 @@ For your convenience here is also an inlined version of ``pytest_figleaf.py``:
]) ])
#print result.stdout.str() #print result.stdout.str()
.. _`pytest_figleaf.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_figleaf.py .. _`pytest_figleaf.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_figleaf.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -65,7 +65,7 @@ For your convenience here is also an inlined version of ``pytest_hooklog.py``:
assert s.find("ItemTestReport") != -1 assert s.find("ItemTestReport") != -1
assert s.find("sessionfinish") != -1 assert s.find("sessionfinish") != -1
.. _`pytest_hooklog.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_hooklog.py .. _`pytest_hooklog.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_hooklog.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -164,7 +164,7 @@ For your convenience here is also an inlined version of ``pytest_iocapture.py``:
""") """)
reprec.assertoutcome(passed=1) reprec.assertoutcome(passed=1)
.. _`pytest_iocapture.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_iocapture.py .. _`pytest_iocapture.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_iocapture.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -103,7 +103,7 @@ For your convenience here is also an inlined version of ``pytest_keyword.py``:
result = testdir.runpytest(p) result = testdir.runpytest(p)
assert result.stdout.fnmatch_lines(["*passed*"]) assert result.stdout.fnmatch_lines(["*passed*"])
.. _`pytest_keyword.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_keyword.py .. _`pytest_keyword.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_keyword.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -182,7 +182,7 @@ For your convenience here is also an inlined version of ``pytest_monkeypatch.py`
res = reprec.countoutcomes() res = reprec.countoutcomes()
assert tuple(res) == (1, 0, 0), res assert tuple(res) == (1, 0, 0), res
.. _`pytest_monkeypatch.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_monkeypatch.py .. _`pytest_monkeypatch.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_monkeypatch.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -185,7 +185,7 @@ For your convenience here is also an inlined version of ``pytest_pdb.py``:
if child.isalive(): if child.isalive():
child.wait() child.wait()
.. _`pytest_pdb.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_pdb.py .. _`pytest_pdb.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_pdb.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

Binary file not shown.

View File

@ -18,6 +18,13 @@ XXX missing docstring
the 'reportrecorder' test function argument the 'reportrecorder' test function argument
------------------------------------------- -------------------------------------------
XXX missing docstring
.. _`venv funcarg`:
the 'venv' test function argument
---------------------------------
XXX missing docstring XXX missing docstring
.. _`linecomp funcarg`: .. _`linecomp funcarg`:
@ -25,6 +32,13 @@ XXX missing docstring
the 'linecomp' test function argument the 'linecomp' test function argument
------------------------------------- -------------------------------------
XXX missing docstring
.. _`py_setup funcarg`:
the 'py_setup' test function argument
-------------------------------------
XXX missing docstring XXX missing docstring
.. _`LineMatcher funcarg`: .. _`LineMatcher funcarg`:
@ -61,6 +75,7 @@ For your convenience here is also an inlined version of ``pytest_pytester.py``:
import inspect import inspect
from py.__.test.config import Config as pytestConfig from py.__.test.config import Config as pytestConfig
import hookspec import hookspec
import subprocess
pytest_plugins = '_pytest' pytest_plugins = '_pytest'
@ -560,8 +575,108 @@ For your convenience here is also an inlined version of ``pytest_pytester.py``:
assert result.stdout.fnmatch_lines([ assert result.stdout.fnmatch_lines([
"*1 passed*" "*1 passed*"
]) ])
#
# experimental funcargs for venv/install-tests
#
def pytest_funcarg__venv(request):
p = request.config.mktemp(request.function.__name__, numbered=True)
venv = VirtualEnv(str(p))
venv.create()
return venv
def pytest_funcarg__py_setup(request):
rootdir = py.path.local(py.__file__).dirpath().dirpath()
setup = rootdir.join('setup.py')
if not setup.check():
py.test.skip("not found: %r" % setup)
return SetupBuilder(setup)
class SetupBuilder:
def __init__(self, setup_path):
self.setup_path = setup_path
def make_sdist(self, destdir=None):
temp = py.path.local.mkdtemp()
try:
args = ['python', str(self.setup_path), 'sdist',
'--dist-dir', str(temp)]
subprocess.check_call(args)
l = temp.listdir('py-*')
assert len(l) == 1
sdist = l[0]
if destdir is None:
destdir = self.setup_path.dirpath('build')
assert destdir.check()
else:
destdir = py.path.local(destdir)
target = destdir.join(sdist.basename)
sdist.copy(target)
return target
finally:
temp.remove()
# code taken from Ronny Pfannenschmidt's virtualenvmanager
class VirtualEnv(object):
def __init__(self, path):
#XXX: supply the python executable
self.path = path
def __repr__(self):
return "<VirtualEnv at %r>" %(self.path)
def _cmd(self, name):
return os.path.join(self.path, 'bin', name)
@property
def valid(self):
return os.path.exists(self._cmd('python'))
def create(self, sitepackages=False):
args = ['virtualenv', self.path]
if not sitepackages:
args.append('--no-site-packages')
subprocess.check_call(args)
def makegateway(self):
python = self._cmd('python')
return py.execnet.makegateway("popen//python=%s" %(python,))
def pcall(self, cmd, *args, **kw):
assert self.valid
return subprocess.call([
self._cmd(cmd)
] + list(args),
**kw)
def easy_install(self, *packages, **kw):
args = []
if 'index' in kw:
index = kw['index']
if isinstance(index, (list, tuple)):
for i in index:
args.extend(['-i', i])
else:
args.extend(['-i', index])
args.extend(packages)
self.pcall('easy_install', *args)
@property
def has_pip(self):
return os.path.exists(self._cmd('pip'))
def pip_install(self, *packages):
if not self.has_pip:
self.easy_install('pip')
self.pcall('pip', *packages)
.. _`pytest_pytester.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_pytester.py .. _`pytest_pytester.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_pytester.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -204,7 +204,7 @@ For your convenience here is also an inlined version of ``pytest_recwarn.py``:
py.test.deprecated_call(dep_explicit, 0) py.test.deprecated_call(dep_explicit, 0)
py.test.deprecated_call(dep_explicit, 0) py.test.deprecated_call(dep_explicit, 0)
.. _`pytest_recwarn.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_recwarn.py .. _`pytest_recwarn.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_recwarn.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -524,7 +524,7 @@ For your convenience here is also an inlined version of ``pytest_restdoc.py``:
assert not failed assert not failed
assert skipped <= 1 assert skipped <= 1
.. _`pytest_restdoc.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_restdoc.py .. _`pytest_restdoc.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_restdoc.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -274,7 +274,7 @@ For your convenience here is also an inlined version of ``pytest_resultlog.py``:
"s *:test_skip", "s *:test_skip",
]) ])
.. _`pytest_resultlog.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_resultlog.py .. _`pytest_resultlog.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_resultlog.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -297,7 +297,7 @@ For your convenience here is also an inlined version of ``pytest_runner.py``:
col.setup() col.setup()
self.stack.append(col) self.stack.append(col)
.. _`pytest_runner.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_runner.py .. _`pytest_runner.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_runner.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -425,7 +425,7 @@ For your convenience here is also an inlined version of ``pytest_terminal.py``:
except (TypeError, ValueError): except (TypeError, ValueError):
return str(v) return str(v)
.. _`pytest_terminal.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_terminal.py .. _`pytest_terminal.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_terminal.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -155,7 +155,7 @@ For your convenience here is also an inlined version of ``pytest_unittest.py``:
assert passed == 2 assert passed == 2
assert passed + skipped + failed == 2 assert passed + skipped + failed == 2
.. _`pytest_unittest.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_unittest.py .. _`pytest_unittest.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_unittest.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html

View File

@ -127,7 +127,7 @@ For your convenience here is also an inlined version of ``pytest_xfail.py``:
]) ])
assert result.ret == 1 assert result.ret == 1
.. _`pytest_xfail.py`: http://bitbucket.org/hpk42/py-trunk/raw/c28e76a64569475dda8b92c68f9c1c0902c5049e/py/test/plugin/pytest_xfail.py .. _`pytest_xfail.py`: http://bitbucket.org/hpk42/py-trunk/raw/3d511a58acc10477ff4f766df4a9224cfc3546af/py/test/plugin/pytest_xfail.py
.. _`extend`: ../extend.html .. _`extend`: ../extend.html
.. _`plugins`: index.html .. _`plugins`: index.html
.. _`contact`: ../../contact.html .. _`contact`: ../../contact.html