From commits-noreply at bitbucket.org Mon Aug 3 08:30:43 2009
From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org)
Date: Mon, 03 Aug 2009 06:30:43 -0000
Subject: [py-svn] commit/py-3k: yangyan5: make a simple test(test_test)
which will fail under python3.1
Message-ID: <20090803063043.31361.43806@domU-12-31-39-00-D4-C1.compute-1.internal>
1 new changeset in py-3k:
http://www.bitbucket.org/yangyan5/py-3k/changeset/5c0cfbe9469e/
changeset: r1165:5c0cfbe9469e
user: yangyan5
date: 2009-08-03 08:30:27
summary: make a simple test(test_test) which will fail under python3.1
affected #: 5 files (693 bytes)
Repository URL: http://bitbucket.org/yangyan5/py-3k/
--
This is a commit notification from bitbucket.org.
You are receiving this because you have the service
enabled, addressing the recipient of this email.
From hpk at codespeak.net Tue Aug 4 19:45:35 2009
From: hpk at codespeak.net (hpk at codespeak.net)
Date: Tue, 4 Aug 2009 19:45:35 +0200 (CEST)
Subject: [py-svn] r66740 - in py/trunk: . doc doc/announce doc/test
doc/test/plugin example/assertion example/execnet
example/funcarg example/funcarg/costlysetup/sub1
example/funcarg/costlysetup/sub2 py py/code py/code/testing
py/execnet py/execnet/testing py/io py/io/testing py/magic
py/magic/testing py/path py/path/svn py/process/testing
py/test py/test/dist py/test/dist/testing py/test/looponfail
py/test/plugin py/test/testing
Message-ID: <20090804174535.0D84516804C@codespeak.net>
Author: hpk
Date: Tue Aug 4 19:45:30 2009
New Revision: 66740
Added:
py/trunk/doc/test/plugin/
py/trunk/doc/test/plugin/capture.txt
py/trunk/doc/test/plugin/doctest.txt
py/trunk/doc/test/plugin/figleaf.txt
py/trunk/doc/test/plugin/hooklog.txt
py/trunk/doc/test/plugin/hookspec.txt
py/trunk/doc/test/plugin/index.txt
py/trunk/doc/test/plugin/keyword.txt
py/trunk/doc/test/plugin/links.txt
py/trunk/doc/test/plugin/monkeypatch.txt
py/trunk/doc/test/plugin/oejskit.txt
py/trunk/doc/test/plugin/pastebin.txt
py/trunk/doc/test/plugin/pdb.txt
py/trunk/doc/test/plugin/recwarn.txt
py/trunk/doc/test/plugin/restdoc.txt
py/trunk/doc/test/plugin/resultlog.txt
py/trunk/doc/test/plugin/terminal.txt
py/trunk/doc/test/plugin/unittest.txt
py/trunk/doc/test/plugin/xfail.txt
py/trunk/example/assertion/
py/trunk/example/assertion/failure_demo.py
py/trunk/example/assertion/test_failures.py
py/trunk/example/assertion/test_setup_flow_example.py
py/trunk/example/execnet/redirect_remote_output.py
py/trunk/example/execnet/svn-sync-repo.py
py/trunk/example/execnet/sysinfo.py
py/trunk/example/funcarg/conftest.py
py/trunk/example/funcarg/costlysetup/sub1/__init__.py
py/trunk/example/funcarg/costlysetup/sub2/__init__.py
py/trunk/py/test/dist/testing/acceptance_test.py
py/trunk/py/test/plugin/pytest_capture.py
py/trunk/py/test/plugin/pytest_keyword.py
py/trunk/py/test/plugin/pytest_pastebin.py
py/trunk/py/test/plugin/test_pytest_capture.py
py/trunk/py/test/plugin/test_pytest_runner_xunit.py
py/trunk/py/test/plugin/test_pytest_terminal.py
py/trunk/py/test/testing/test_install.py
Removed:
py/trunk/ez_setup.py
py/trunk/py/test/plugin/pytest_iocapture.py
py/trunk/py/test/plugin/pytest_pocoo.py
py/trunk/py/test/plugin/pytest_resultdb.py
py/trunk/py/test/testing/test_setup_functional.py
Modified:
py/trunk/.hgignore
py/trunk/CHANGELOG
py/trunk/MANIFEST
py/trunk/doc/announce/release-1.0.0.txt
py/trunk/doc/code.txt
py/trunk/doc/confrest.py
py/trunk/doc/contact.txt
py/trunk/doc/download.txt
py/trunk/doc/execnet.txt
py/trunk/doc/index.txt
py/trunk/doc/style.css
py/trunk/doc/test/config.txt
py/trunk/doc/test/extend.txt
py/trunk/doc/test/features.txt
py/trunk/doc/test/funcargs.txt
py/trunk/doc/test/quickstart.txt
py/trunk/doc/test/test.txt
py/trunk/py/__init__.py
py/trunk/py/code/excinfo.py
py/trunk/py/code/testing/test_excinfo.py
py/trunk/py/conftest.py
py/trunk/py/execnet/register.py
py/trunk/py/execnet/testing/test_gateway.py
py/trunk/py/io/stdcapture.py
py/trunk/py/io/terminalwriter.py
py/trunk/py/io/testing/test_stdcapture.py
py/trunk/py/magic/exprinfo.py
py/trunk/py/magic/testing/test_exprinfo.py
py/trunk/py/path/common.py
py/trunk/py/path/svn/wccommand.py
py/trunk/py/process/testing/test_forkedfunc.py
py/trunk/py/test/collect.py
py/trunk/py/test/config.py
py/trunk/py/test/defaultconftest.py
py/trunk/py/test/dist/dsession.py
py/trunk/py/test/dist/mypickle.py
py/trunk/py/test/dist/testing/test_dsession.py
py/trunk/py/test/dist/testing/test_nodemanage.py
py/trunk/py/test/dist/testing/test_txnode.py
py/trunk/py/test/dist/txnode.py
py/trunk/py/test/funcargs.py
py/trunk/py/test/looponfail/remote.py
py/trunk/py/test/plugin/hookspec.py
py/trunk/py/test/plugin/pytest__pytest.py
py/trunk/py/test/plugin/pytest_default.py
py/trunk/py/test/plugin/pytest_doctest.py
py/trunk/py/test/plugin/pytest_execnetcleanup.py
py/trunk/py/test/plugin/pytest_figleaf.py
py/trunk/py/test/plugin/pytest_hooklog.py
py/trunk/py/test/plugin/pytest_monkeypatch.py
py/trunk/py/test/plugin/pytest_pdb.py
py/trunk/py/test/plugin/pytest_pylint.py
py/trunk/py/test/plugin/pytest_pytester.py
py/trunk/py/test/plugin/pytest_recwarn.py
py/trunk/py/test/plugin/pytest_restdoc.py
py/trunk/py/test/plugin/pytest_resultlog.py
py/trunk/py/test/plugin/pytest_runner.py
py/trunk/py/test/plugin/pytest_terminal.py
py/trunk/py/test/plugin/pytest_unittest.py
py/trunk/py/test/plugin/pytest_xfail.py
py/trunk/py/test/plugin/test_pytest_runner.py
py/trunk/py/test/pluginmanager.py
py/trunk/py/test/pycollect.py
py/trunk/py/test/session.py
py/trunk/py/test/testing/acceptance_test.py
py/trunk/py/test/testing/test_config.py
py/trunk/py/test/testing/test_funcargs.py
py/trunk/py/test/testing/test_outcome.py
py/trunk/py/test/testing/test_parseopt.py
py/trunk/py/test/testing/test_pluginmanager.py
py/trunk/py/test/testing/test_pycollect.py
py/trunk/setup.py
Log:
snapshotting mercurial py-trunk (1.0.0) to py/trunk
Modified: py/trunk/.hgignore
==============================================================================
--- py/trunk/.hgignore (original)
+++ py/trunk/.hgignore Tue Aug 4 19:45:30 2009
@@ -11,3 +11,6 @@
*.pyo
*.swp
*.html
+
+build/
+py.egg-info
Modified: py/trunk/CHANGELOG
==============================================================================
--- py/trunk/CHANGELOG (original)
+++ py/trunk/CHANGELOG Tue Aug 4 19:45:30 2009
@@ -1,6 +1,81 @@
-Changes between 1.0.0b3 and 1.0.0
+Changes between 1.0.0b9 and 1.0.0
+=====================================
+
+* more terse reporting try to show filesystem path relatively to current dir
+* improve xfail output a bit
+
+Changes between 1.0.0b8 and 1.0.0b9
+=====================================
+
+* cleanly handle and report final teardown of test setup
+
+* fix svn-1.6 compat issue with py.path.svnwc().versioned()
+ (thanks Wouter Vanden Hove)
+
+* setup/teardown or collection problems now show as ERRORs
+ or with big "E"'s in the progress lines. they are reported
+ and counted separately.
+
+* dist-testing: properly handle test items that get locally
+ collected but cannot be collected on the remote side - often
+ due to platform/dependency reasons
+
+* simplified py.test.mark API - see keyword plugin documentation
+
+* integrate better with logging: capturing now by default captures
+ test functions and their immediate setup/teardown in a single stream
+
+* capsys and capfd funcargs now have a readouterr() and a close() method
+ (underlyingly py.io.StdCapture/FD objects are used which grew a
+ readouterr() method as well to return snapshots of captured out/err)
+
+* make assert-reinterpretation work better with comparisons not
+ returning bools (reported with numpy from thanks maciej fijalkowski)
+
+* reworked per-test output capturing into the pytest_iocapture.py plugin
+ and thus removed capturing code from config object
+
+* item.repr_failure(excinfo) instead of item.repr_failure(excinfo, outerr)
+
+
+Changes between 1.0.0b7 and 1.0.0b8
+=====================================
+
+* pytest_unittest-plugin is now enabled by default
+
+* introduced pytest_keyboardinterrupt hook and
+ refined pytest_sessionfinish hooked, added tests.
+
+* workaround a buggy logging module interaction ("closing already closed
+ files"). Thanks to Sridhar Ratnakumar for triggering.
+
+* if plugins use "py.test.importorskip" for importing
+ a dependency only a warning will be issued instead
+ of exiting the testing process.
+
+* many improvements to docs:
+ - refined funcargs doc , use the term "factory" instead of "provider"
+ - added a new talk/tutorial doc page
+ - better download page
+ - better plugin docstrings
+ - added new plugins page and automatic doc generation script
+
+* fixed teardown problem related to partially failing funcarg setups
+ (thanks MrTopf for reporting), "pytest_runtest_teardown" is now
+ always invoked even if the "pytest_runtest_setup" failed.
+
+* tweaked doctest output for docstrings in py modules,
+ thanks Radomir.
+
+Changes between 1.0.0b3 and 1.0.0b7
=============================================
+* renamed py.test.xfail back to py.test.mark.xfail to avoid
+ two ways to decorate for xfail
+
+* re-added py.test.mark decorator for setting keywords on functions
+ (it was actually documented so removing it was not nice)
+
* remove scope-argument from request.addfinalizer() because
request.cached_setup has the scope arg. TOOWTDI.
Modified: py/trunk/MANIFEST
==============================================================================
--- py/trunk/MANIFEST (original)
+++ py/trunk/MANIFEST Tue Aug 4 19:45:30 2009
@@ -1,10 +1,6 @@
-MANIFEST
-py/__init__.py
-setup.py
-.hgignore
-.hgtags
CHANGELOG
LICENSE
+MANIFEST
README.txt
_findpy.py
doc/announce/release-0.9.0.txt
@@ -32,13 +28,41 @@
doc/test/extend.txt
doc/test/features.txt
doc/test/funcargs.txt
+doc/test/plugin/capture.txt
+doc/test/plugin/doctest.txt
+doc/test/plugin/figleaf.txt
+doc/test/plugin/hooklog.txt
+doc/test/plugin/hookspec.txt
+doc/test/plugin/index.txt
+doc/test/plugin/keyword.txt
+doc/test/plugin/links.txt
+doc/test/plugin/monkeypatch.txt
+doc/test/plugin/oejskit.txt
+doc/test/plugin/pastebin.txt
+doc/test/plugin/pdb.txt
+doc/test/plugin/recwarn.txt
+doc/test/plugin/restdoc.txt
+doc/test/plugin/resultlog.txt
+doc/test/plugin/terminal.txt
+doc/test/plugin/unittest.txt
+doc/test/plugin/xfail.txt
doc/test/quickstart.txt
+doc/test/talks.txt
doc/test/test.txt
doc/test/xunit_setup.txt
doc/xml.txt
+example/assertion/failure_demo.py
+example/assertion/test_failures.py
+example/assertion/test_setup_flow_example.py
example/execnet/popen_read_multiple.py
+example/execnet/redirect_remote_output.py
+example/execnet/svn-sync-repo.py
+example/execnet/sysinfo.py
+example/funcarg/conftest.py
example/funcarg/costlysetup/conftest.py
+example/funcarg/costlysetup/sub1/__init__.py
example/funcarg/costlysetup/sub1/test_quick.py
+example/funcarg/costlysetup/sub2/__init__.py
example/funcarg/costlysetup/sub2/test_two.py
example/funcarg/mysetup/__init__.py
example/funcarg/mysetup/conftest.py
@@ -56,11 +80,9 @@
example/genhtml.py
example/genhtmlcss.py
example/genxml.py
-example/pytest/failure_demo.py
-example/pytest/test_failures.py
-example/pytest/test_setup_flow_example.py
-ez_setup.py
+makepluginlist.py
py/LICENSE
+py/__init__.py
py/_com.py
py/bin/_findpy.py
py/bin/_genscripts.py
@@ -296,6 +318,7 @@
py/test/dist/mypickle.py
py/test/dist/nodemanage.py
py/test/dist/testing/__init__.py
+py/test/dist/testing/acceptance_test.py
py/test/dist/testing/test_dsession.py
py/test/dist/testing/test_mypickle.py
py/test/dist/testing/test_nodemanage.py
@@ -314,27 +337,30 @@
py/test/plugin/conftest.py
py/test/plugin/hookspec.py
py/test/plugin/pytest__pytest.py
+py/test/plugin/pytest_capture.py
py/test/plugin/pytest_default.py
py/test/plugin/pytest_doctest.py
py/test/plugin/pytest_execnetcleanup.py
py/test/plugin/pytest_figleaf.py
py/test/plugin/pytest_hooklog.py
-py/test/plugin/pytest_iocapture.py
+py/test/plugin/pytest_keyword.py
py/test/plugin/pytest_monkeypatch.py
+py/test/plugin/pytest_pastebin.py
py/test/plugin/pytest_pdb.py
-py/test/plugin/pytest_pocoo.py
py/test/plugin/pytest_pylint.py
py/test/plugin/pytest_pytester.py
py/test/plugin/pytest_recwarn.py
py/test/plugin/pytest_restdoc.py
-py/test/plugin/pytest_resultdb.py
py/test/plugin/pytest_resultlog.py
py/test/plugin/pytest_runner.py
py/test/plugin/pytest_terminal.py
py/test/plugin/pytest_tmpdir.py
py/test/plugin/pytest_unittest.py
py/test/plugin/pytest_xfail.py
+py/test/plugin/test_pytest_capture.py
py/test/plugin/test_pytest_runner.py
+py/test/plugin/test_pytest_runner_xunit.py
+py/test/plugin/test_pytest_terminal.py
py/test/pluginmanager.py
py/test/pycollect.py
py/test/session.py
@@ -353,6 +379,7 @@
py/test/testing/test_deprecated_api.py
py/test/testing/test_funcargs.py
py/test/testing/test_genitems.py
+py/test/testing/test_install.py
py/test/testing/test_outcome.py
py/test/testing/test_parseopt.py
py/test/testing/test_pickling.py
@@ -360,7 +387,6 @@
py/test/testing/test_pycollect.py
py/test/testing/test_recording.py
py/test/testing/test_session.py
-py/test/testing/test_setup_functional.py
py/test/testing/test_traceback.py
py/test/web/__init__.py
py/test/web/exception.py
@@ -383,4 +409,5 @@
py/xmlobj/testing/test_html.py
py/xmlobj/testing/test_xml.py
py/xmlobj/visit.py
-py/xmlobj/xml.py
\ No newline at end of file
+py/xmlobj/xml.py
+setup.py
\ No newline at end of file
Modified: py/trunk/doc/announce/release-1.0.0.txt
==============================================================================
--- py/trunk/doc/announce/release-1.0.0.txt (original)
+++ py/trunk/doc/announce/release-1.0.0.txt Tue Aug 4 19:45:30 2009
@@ -1,54 +1,63 @@
-py.test / py lib 1.0.0: new test plugins, funcargs and cleanups
-============================================================================
-Welcome to the 1.0 release bringing new flexibility and
-power to testing with Python. Main news:
+pylib 1.0.0 released: testing-with-python innovations continue
+--------------------------------------------------------------------
-* improved test architecture, featuring super-simple project
- specific or cross-project single-file plugins, e.g:
+Took a few betas but finally i uploaded a `1.0.0 py lib release`_,
+featuring the mature and powerful py.test tool and "execnet-style"
+*elastic* distributed programming. With the new release, there are
+many new advanced automated testing features - here is a quick summary:
- * pytest_unittest.py: run traditional unittest.py tests
- * pytest_xfail.py: mark tests as "expected to fail"
- * pytest_pocoo.py: automatically send tracebacks to pocoo paste service
- * pytest_monkeypatch.py: safely patch parts of your environment in a test function
- * pytest_figleaf.py: generate html coverage reports
- * pytest_resultlog.py: generate buildbot-friendly output
+* funcargs_ - pythonic zero-boilerplate fixtures for Python test functions :
- and many more!
-
-* funcargs - bringing new flexibilty and zero-boilerplate to Python testing:
-
- - cleanly separated test code and test configuration and test value setup
+ - totally separates test code, test configuration and test setup
- ideal for integration and functional tests
- - new generative tests -> deprecation of yield-generated tests
+ - allows for flexible and natural test parametrization schemes
-* distributed testing and distributed execution (py.execnet):
+* new `plugin architecture`_, allowing easy-to-write project-specific and cross-project single-file plugins. The most notable new external plugin is `oejskit`_ which naturally enables **running and reporting of javascript-unittests in real-life browsers**.
- - new unified "TX" URL scheme for specifying remote resources
- - new sync/async ways to handle multiple remote processes
- - much improved documentation
+* many new features done in easy-to-improve `default plugins`_, highlights:
+ * xfail: mark tests as "expected to fail" and report separately.
+ * pastebin: automatically send tracebacks to pocoo paste service
+ * capture: flexibly capture stdout/stderr of subprocesses, per-test ...
+ * monkeypatch: safely monkeypatch modules/classes from within tests
+ * unittest: run and integrate traditional unittest.py tests
+ * figleaf: generate html coverage reports with the figleaf module
+ * resultlog: generate buildbot-friendly reporting output
+ * ...
-See the py.test documentation for more info:
+* `distributed testing`_ and `elastic distributed execution`_:
- http://pytest.org
+ - new unified "TX" URL scheme for specifying remote processes
+ - new distribution modes "--dist=each" and "--dist=load"
+ - new sync/async ways to handle 1:N communication
+ - improved documentation
-The py lib also got smaller and focuses on offering much of the
-well-tested py.test code in independent namespaces:
+The py lib continues to offer most of the functionality used by
+the testing tool in `independent namespaces`_.
-* py.execnet: ad-hoc code distribution to SSH, Socket and local sub processes
-* py.code: higher-level introspection and dynamic generation of python code
-* py.path: path abstractions over local and subversion files
+Some non-test related code, notably greenlets/co-routines and
+api-generation now live as their own projects which simplifies the
+installation procedure because no C-Extensions are required anymore.
-Some non-strictly-test related code, notably greenlets/co-routines
-and apigen now live on their own and have been removed, also simplifying
-the installation procedures.
+The whole package should work well with Linux, Win32 and OSX, on Python
+2.3, 2.4, 2.5 and 2.6. (Expect Python3 compatibility soon!)
-The whole package works well with Linux, OSX and Win32, on
-Python 2.3, 2.4, 2.5 and 2.6. (Expect Python3 compatibility soon!)
+For more info, see the py.test and py lib documentation:
-Download/Install: http://codespeak.net/py/dist/download.html
+ http://pytest.org
+
+ http://pylib.org
-best,
+have fun,
holger
+.. _`independent namespaces`: http://pylib.org
+.. _`funcargs`: http://codespeak.net/py/dist/test/funcargs.html
+.. _`plugin architecture`: http://codespeak.net/py/dist/test/extend.html
+.. _`default plugins`: http://codespeak.net/py/dist/test/plugin/index.html
+.. _`distributed testing`: http://codespeak.net/py/dist/test/dist.html
+.. _`elastic distributed execution`: http://codespeak.net/py/dist/execnet.html
+.. _`1.0.0 py lib release`: http://pypi.python.org/pypi/py
+.. _`oejskit`: http://codespeak.net/py/dist/test/plugin/oejskit.html
+
Modified: py/trunk/doc/code.txt
==============================================================================
--- py/trunk/doc/code.txt (original)
+++ py/trunk/doc/code.txt Tue Aug 4 19:45:30 2009
@@ -1,8 +1,8 @@
-=======
-py.code
-=======
+================================================================================
+py.code: higher level python code and introspection objects
+================================================================================
-The :api:`py.code` part of the 'py lib' contains some functionality to help
+The :api:`py.code` part of the pylib contains some functionality to help
dealing with Python code objects. Even though working with Python's internal
code objects (as found on frames and callables) can be very powerful, it's
usually also quite cumbersome, because the API provided by core Python is
Modified: py/trunk/doc/confrest.py
==============================================================================
--- py/trunk/doc/confrest.py (original)
+++ py/trunk/doc/confrest.py Tue Aug 4 19:45:30 2009
@@ -4,9 +4,27 @@
html = py.xml.html
+class css:
+ #pagetitle = "pagetitle"
+ contentspace = "contentspace"
+ menubar = "menubar"
+ navspace = "navspace"
+ versioninfo = "versioninfo"
+
class Page(object):
doctype = ('\n')
+ googlefragment = """
+
+
+"""
def __init__(self, project, title, targetpath, stylesheeturl=None,
type="text/html", encoding="ISO-8859-1"):
@@ -22,8 +40,8 @@
self._root = html.html(self.head, self.body)
self.fill()
- def a_href(self, name, url):
- return html.a(name, class_="menu", href=url)
+ def a_href(self, name, url, **kwargs):
+ return html.a(name, class_="menu", href=url, **kwargs)
def a_docref(self, name, relhtmlpath):
docpath = self.project.docpath
@@ -39,20 +57,29 @@
def fill_menubar(self):
items = [
- self.a_docref("index", "index.html"),
+ self.a_docref("pylib index", "index.html"),
+ self.a_docref("test doc-index", "test/test.html"),
+ self.a_docref("test quickstart", "test/quickstart.html"),
+ self.a_docref("test features", "test/features.html"),
+ self.a_docref("test plugins", "test/plugin/index.html"),
+ self.a_docref("py.execnet", "execnet.html"),
+ #self.a_docref("py.code", "code.html"),
#self.a_apigenref("api", "api/index.html"),
#self.a_apigenref("source", "source/index.html"),
#self.a_href("source", "http://bitbucket.org/hpk42/py-trunk/src/"),
self.a_href("issues", "http://bitbucket.org/hpk42/py-trunk/issues/"),
self.a_docref("contact", "contact.html"),
- self.a_docref("download", "download.html"),
+ self.a_docref("install", "download.html"),
]
- items2 = [items.pop(0)]
- sep = " "
- for item in items:
- items2.append(sep)
- items2.append(item)
- self.menubar = html.div(id="menubar", *items2)
+ self.menubar = html.div(id=css.menubar, *[
+ html.div(item) for item in items])
+ version = py.version
+ self.menubar.insert(0,
+ html.div("%s" % (py.version), style="font-style: italic;")
+ )
+ #self.a_href("%s-%s" % (self.title, py.version),
+ # "http://pypi.python.org/pypi/py/%s" % version,
+ #id="versioninfo",
def fill(self):
content_type = "%s;charset=%s" %(self.type, self.encoding)
@@ -65,18 +92,19 @@
type="text/css"))
self.fill_menubar()
- self.metaspace = html.div(
- html.div(self.title, class_="project_title"),
- self.menubar,
- id='metaspace')
-
- self.body.append(self.project.logo)
- self.body.append(self.metaspace)
- self.contentspace = html.div(id="contentspace")
+ self.body.append(html.div(
+ self.project.logo,
+ self.menubar,
+ id=css.navspace,
+ ))
+
+ #self.body.append(html.div(self.title, id=css.pagetitle))
+ self.contentspace = html.div(id=css.contentspace)
self.body.append(self.contentspace)
def unicode(self, doctype=True):
page = self._root.unicode()
+ page = page.replace("