[py-svn] r56308 - py/extradoc/talk/ep2008
hpk at codespeak.net
hpk at codespeak.net
Fri Jul 4 18:36:42 CEST 2008
Author: hpk
Date: Fri Jul 4 18:36:41 2008
New Revision: 56308
Modified:
py/extradoc/talk/ep2008/pytest.txt
Log:
complete the draft talk
Modified: py/extradoc/talk/ep2008/pytest.txt
==============================================================================
--- py/extradoc/talk/ep2008/pytest.txt (original)
+++ py/extradoc/talk/ep2008/pytest.txt Fri Jul 4 18:36:41 2008
@@ -4,7 +4,7 @@
py.test: rapid testing with minimal effort
=================================================================
-:authors: Holger Krekel (merlinux GmbH)
+:author: Holger Krekel, merlinux GmbH
:event: 7.7.2008, EuroPython 2008, Vilnius
What is py.test?
@@ -180,13 +180,94 @@
3
-XXX write and refactor below
-Extending py.test
+Customizing py.test
===========================
-k
-- py.test allows to insert custom test items
-- py.test consults "conftest.py" files
-
+
+- write "confest.py" files at project or global level
+- conftest.py allow to:
+ - integrate new test "items" or "collectors"
+ - add command line options
+ - influence the collection process
+- conftest.py's are picked up "upwards"
+- debug aid::
+ py.test --collectonly
+ py.test --traceconfig
+
+
+The collection process
+===========================
+
+- test collection starts from directories or files
+- collection process forms a tree:
+ - leaves: so called "items", e.g. ``py.test.collect.Function``
+ - nodes: so called "collectors" contain further collectors or items
+- lookup of Collector/Item class from conftest.py files
+
+
+Example conftest.py: add ReST check support
+==============================================
+
+look into py/doc/conftest.py:
+
+- this produces non-python test items
+- ``py.test --collectonly`` shows the custom tree
+- produces syntax and link checks
+- drop the conftest.py file into your own project/doc directory
+
+Example conftest.py: html page generation
+===========================================
+
+http://codespeak.net/svn/user/arigo/hack/misc/htmlconftest
+
+- creates html output with "clickable" failures
+- creates a nice historic view on test failures
+- see http://wyvern.cs.uni-duesseldorf.de/pypytest/summary.html
+- see README.sh for usage for your project
+
+Example conftest.py: run Prolog tests
+======================================
+
+http://codespeak.net/svn/user/cfbolz/jitpl/dist/test/conftest.py
+
+- creates PrologTest items
+- collects items and runs them through Prolog interpreter
+
+
+Example conftest.py: cross-platform testing
+=============================================
+
+- goal: remotely run tests on windows
+- check out py/misc/conftest-socketgatewayrun.py
+- requires one small script on the windows side
+- transfers your source code to windows, runs tests,
+ reports on your terminal
+
+
+Summary extensions
+========================
+
+- conftest.py's can be re-used per-project
+- can add new (non-python) test items
+- if you use the above conftest.py's or have some of your own
+ please subscribe http://codespeak.net/mailman/listinfo/py-dev
+
+note, however:
+- no easy customization of reporting (yet)
+- some details will change for py lib 1.0 release
+
+XXX refactor / do extra slides see what could stay / below
+
+
+
+
+
+
+
+
+
+
+
+
recap: main features
More information about the pytest-commit
mailing list