<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FND's Blag &#187; testing</title>
	<atom:link href="http://fnd.lewcid.org/blog/archive/tag/testing/feed" rel="self" type="application/rss+xml" />
	<link>http://fnd.lewcid.org/blog</link>
	<description>Just Another Personal Wobsite</description>
	<lastBuildDate>Thu, 11 Mar 2010 15:19:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Rapid Testing with py.test</title>
		<link>http://fnd.lewcid.org/blog/archive/80</link>
		<comments>http://fnd.lewcid.org/blog/archive/80#comments</comments>
		<pubDate>Mon, 29 Jun 2009 20:56:36 +0000</pubDate>
		<dc:creator>FND</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[EuroPython]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://fnd.lewcid.org/blog/?p=80</guid>
		<description><![CDATA[Somewhat unexpectedly, I attended a tutorial on py.test at EuroPython today &#8212; which turned out to be very useful. Below are my raw (i.e. imperfect and likely inadequate) notes from that session. minimal, no-API approach; no need for boilerplates however, a lot of optional framework-y functionality is provided convention over configuration (automatic discovery of test_*.py, [...]]]></description>
			<content:encoded><![CDATA[<p>Somewhat <a href="http://twitter.com/FND/status/2385511283">unexpectedly</a>, I attended a tutorial on <a href="http://pytest.org">py.test</a> at EuroPython today &mdash; which turned out to be <a href="http://twitter.com/FND/status/2387884483">very useful</a>.<br />
<span id="more-80"></span><br />
Below are my raw (i.e. imperfect and likely inadequate) notes from that session.</p>
<ul>
<li>
		minimal, no-API approach; no need for boilerplates<br />
		however, a lot of optional framework-y functionality is provided
	</li>
<li>convention over configuration (automatic discovery of <code>test_*.py</code>, <code>def test_*</code>, <code>class Test*</code>)</li>
<li><i>py.test</i> overrides <code>AssertionError</code> built-in, then re-runs statement to provide details &mdash; avoid assertions with side-effects!</li>
<li>skip tests only for platform and dependency issues; use <code>@py.test.mark.xfail</code> for &#8220;expected to fail&#8221;</li>
<li><i>funcargs</i> introduced in v1.0 to replace traditional setup methods for fixtures (user &#038; provider, loose coupling); allows for more flexible grouping</li>
<li><code>print</code> captured by default, only shown on failure</li>
<li>internally makes use of its own hook architecture (i.e. many features implemented as plugins)</li>
<li><code>yield</code>ed tests are deprecated (due to internal ambiguity); recommended to use <code>pytest_generate_tests</code> instead</li>
<li>interesting <a href="http://codespeak.net/svn/py/trunk/py/test/plugin/">plugins</a>: coverage and PyLint integration</li>
<li>can be used to run non-Python tests (e.g. <a href="http://bitbucket.org/pedronis/js-infrastructure/">for JavaScript</a>)</li>
<li>supports distributed testing (load balancing with multiple CPUs or remote machines, testing on multiple platforms)</li>
<li>might be renamed (&#8220;I wish I&#8217;d named it differently&#8221;)</li>
</ul>
<p><a href="http://tetamap.wordpress.com">Holger Krekel</a> has also published his <a href="http://codespeak.net/~hpk/rapid-testing.pdf">slides</a> (PDF), which are well worth a look.</p>
]]></content:encoded>
			<wfw:commentRss>http://fnd.lewcid.org/blog/archive/80/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
