metaprogramming and politics

Decentralize. Take the red pill.

pylib 1.0.0 released: the testing-with-python innovations continue

with 5 comments

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:

  • funcargs – pythonic zero-boilerplate fixtures for Python test functions :
    • totally separates test code, test configuration and test setup
    • ideal for integration and functional tests
    • allows for flexible and natural test parametrization schemes
  • 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.
  • 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
  • distributed testing and elastic distributed execution:
    • 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 continues to offer most of the functionality used by the testing tool in independent namespaces.

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.

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!)

For more info, see the py.test and py lib documentation:

http://pytest.org

http://pylib.org

have fun, holger

Written by holger krekel

August 4, 2009 at 10:05 am

5 Responses

Subscribe to comments with RSS.

  1. Congratulations to the release! Looks really cool. At one point I should really try to get the Prolog plugin use some of the new cool hooks.

    Carl Friedrich Bolz

    August 4, 2009 at 10:50 am

  2. carl friedrich: thanks and i think that when you port your Prolog plugin i am going to open a page dedicated to testing non-python items :)

    holger krekel

    August 4, 2009 at 1:32 pm

  3. Hi Holger,

    Nice work, I’ve been looking forward to this for a while. :-)

    Is it trivial to do ‘project-level setup’ (as opposed to module level) with 1.0? Can this be done in conftest?

    Dusty Phillips

    August 4, 2009 at 7:29 pm

    • Hi Dusty, i recommend to use “funcargs” with which you can indeed do setup in conftest.py’s, at module or class level or in cross-project plugins. That also helps you to manage scope-specific teardown.
      cheers, holger

      holger krekel

      August 4, 2009 at 7:44 pm

      • I love funcargs, but last time I played with them, the request.cached_setup feature (exactly what I’m looking for now) was either not available or not documented. BTW You’ve written a LOT of documentation in the past several weeks: much appreciated!

        Dusty Phillips

        August 4, 2009 at 7:49 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: