pylib/py.test 1.0.0 released

holger krekel holger at merlinux.eu
Tue Aug 4 13:19:16 EDT 2009


Hello everyone, 

i am happy to announce pylib/py.test 1.0.0, a MIT-licensed
library geared towards advanced testing and elastic distributed
programming with Python.  It features the mature cross-project 
py.test automated testing tool with many new features, aiming to: 

* allow writing zero-boilerplate automated tests in Python 
* offer strong debugging and reporting of test failures
* rapidly run and ad-hoc distribute tests to multiple CPUs/platforms 
* support unit-, functional and integration testing
* be easy to extend and tackle growing testing needs,
  (current prime example oejskit, a live-browser javascript 
  unittesting 3rd party plugin)

Please check things out at: http://pytest.org or read the blogged 
release announcement: 

   http://tetamap.wordpress.com/2009/08/04/pylib-1-0-0

or read on for some ... 

Distinctive new features shipping with py.test 1.0.0
------------------------------------------------------

For those already knowing about the older 0.9.2 release or
being experienced with other testing approaches i'll try to
give a summary of the distinctive testing features 
shipping with 1.0.0:

* test function arguments ("funcargs"):  With this, python test 
  functions can name arguments and one writes factory functions to
  provide instances for such "fixture" arguments.  This page 

        http://codespeak.net/py/dist/test/funcargs.html

  contains reference info and tutorial examples. 
  Test function arguments also allow for natural test parametrization - 
  one provides several different argument values, 
  no changes to the test function needed, no magic "yield" for
  generating tests anymore - although 1.0 still allows them and
  of course still supports traditional xUnit-style setup_module/class/function
  or (new) direct runs of unittest.TestCase style tests. 

* distributed testing: distributing test runs among Linux/OSX/Windows 
  hosts and across python-2.4 till python-2.6 interpreters 
  works reasonably stable now.  This means that you can easily 
  iron out test-module/function specific problems across a 
  variety of platforms, accelerating the change & test feedback cycle.  

* xfail: a new way to mark tests as "expected to fail" which
  means they run normally but are reported/counted specially. 
  This "xfail" mark is meant to mark missing / wrong implementation 
  rather than missing dependencies / wrong platforms for which one
  uses "skip".  Especially for larger test suites making 
  this distinction is very helpful. 

* IO-capturing: output of test functions is captured per-test, 
  by default including any output from sub processes. 
  This works on all platforms and also (now) interacts well 
  with the logging module without importing/using it itself so 
  there are no interferences. 

* pastebin: new command line option "--pastebin" to send your test 
  session output or individual test failures to the Pocoo pastebin 
  service and prints out URLs.  Convenient for quick IRC/messaging 
  communication. 

* plugins: it is now easy to write plugins by implementing one 
  or more of the 37 hooks which py.test calls to implement 
  the testing process. There are many examples, among them  
  the "oejskit" plugin which integrates testing of javascript 
  code in real-life browsers into a regular test run.  
  Apart from such separately distributed "cross-project" plugins 
  you can also write per-project plugins/extensions that lives
  with your testing code.  

cheers & have fun,
holger

-- 
Metaprogramming, Python, Testing: http://tetamap.wordpress.com
Python, PyPy, pytest contracting: http://merlinux.eu 



More information about the Python-list mailing list