<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Kommentare zu: Python unittest: Show log on test failure</title>
	<atom:link href="http://www.piware.de/2012/10/python-unittest-show-log-on-test-failure/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.piware.de/2012/10/python-unittest-show-log-on-test-failure/</link>
	<description>addicted to Free Software Development</description>
	<lastBuildDate>Mon, 06 May 2013 01:32:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Von: pitti</title>
		<link>http://www.piware.de/2012/10/python-unittest-show-log-on-test-failure/comment-page-1/#comment-10629</link>
		<dc:creator>pitti</dc:creator>
		<pubDate>Fri, 12 Apr 2013 03:19:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.piware.de/?p=755#comment-10629</guid>
		<description>You can run the test suite with explicit test names (tests/run MyClass.test_foo) if you want to debug a particular test and only run that one.</description>
		<content:encoded><![CDATA[<p>You can run the test suite with explicit test names (tests/run MyClass.test_foo) if you want to debug a particular test and only run that one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: edin</title>
		<link>http://www.piware.de/2012/10/python-unittest-show-log-on-test-failure/comment-page-1/#comment-10574</link>
		<dc:creator>edin</dc:creator>
		<pubDate>Thu, 11 Apr 2013 14:36:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.piware.de/?p=755#comment-10574</guid>
		<description>Hi,
Do yuo know how to repeat only failed tests? Some call in tearDown...</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Do yuo know how to repeat only failed tests? Some call in tearDown&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Marcel</title>
		<link>http://www.piware.de/2012/10/python-unittest-show-log-on-test-failure/comment-page-1/#comment-8706</link>
		<dc:creator>Marcel</dc:creator>
		<pubDate>Wed, 17 Oct 2012 21:28:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.piware.de/?p=755#comment-8706</guid>
		<description>Sorry for not following up on my comment. The logcapture extension does capture log messages emitted using Python&#039;s logging system. I assumed that was how you generated the log file but I only now realized that it is about a different log file. You could still always &quot;log the log&quot; (i.e. do something like logger.debug(log_output) but then Ulrich&#039;s solution is probably easier.</description>
		<content:encoded><![CDATA[<p>Sorry for not following up on my comment. The logcapture extension does capture log messages emitted using Python&#8217;s logging system. I assumed that was how you generated the log file but I only now realized that it is about a different log file. You could still always &#8220;log the log&#8221; (i.e. do something like logger.debug(log_output) but then Ulrich&#8217;s solution is probably easier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: pitti</title>
		<link>http://www.piware.de/2012/10/python-unittest-show-log-on-test-failure/comment-page-1/#comment-8685</link>
		<dc:creator>pitti</dc:creator>
		<pubDate>Wed, 17 Oct 2012 06:38:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.piware.de/?p=755#comment-8685</guid>
		<description>Ah, thanks Ulrich!</description>
		<content:encoded><![CDATA[<p>Ah, thanks Ulrich!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Ulrich Eckhardt</title>
		<link>http://www.piware.de/2012/10/python-unittest-show-log-on-test-failure/comment-page-1/#comment-8681</link>
		<dc:creator>Ulrich Eckhardt</dc:creator>
		<pubDate>Tue, 16 Oct 2012 19:47:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.piware.de/?p=755#comment-8681</guid>
		<description>Sorry, should have been main(), not runt(), which was a typo anyway.

From http://docs.python.org/library/unittest.html, it&#039;s just &quot;unittest.main(buffer=True)&quot; and you won&#039;t see any of the output of setUp, test and tearDown unless the thing fails. Alternatively, you can pass -b or --buffer on the commandline.

Should be enabled by default, if you ask me. ;)

Uli</description>
		<content:encoded><![CDATA[<p>Sorry, should have been main(), not runt(), which was a typo anyway.</p>
<p>From <a href="http://docs.python.org/library/unittest.html" rel="nofollow">http://docs.python.org/library/unittest.html</a>, it&#8217;s just &#8220;unittest.main(buffer=True)&#8221; and you won&#8217;t see any of the output of setUp, test and tearDown unless the thing fails. Alternatively, you can pass -b or &#8211;buffer on the commandline.</p>
<p>Should be enabled by default, if you ask me. <img src='http://www.piware.de/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Uli</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: pitti</title>
		<link>http://www.piware.de/2012/10/python-unittest-show-log-on-test-failure/comment-page-1/#comment-8645</link>
		<dc:creator>pitti</dc:creator>
		<pubDate>Mon, 15 Oct 2012 05:08:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.piware.de/?p=755#comment-8645</guid>
		<description>Ah, do you have an example how to do that?</description>
		<content:encoded><![CDATA[<p>Ah, do you have an example how to do that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Ulrich Eckhardt</title>
		<link>http://www.piware.de/2012/10/python-unittest-show-log-on-test-failure/comment-page-1/#comment-8644</link>
		<dc:creator>Ulrich Eckhardt</dc:creator>
		<pubDate>Mon, 15 Oct 2012 05:04:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.piware.de/?p=755#comment-8644</guid>
		<description>You can print() things unconditionally and tell unittest.runt() to buffer that output. In case of success, the output is discarded, otherwise it is displayed along with the fault.

Uli</description>
		<content:encoded><![CDATA[<p>You can print() things unconditionally and tell unittest.runt() to buffer that output. In case of success, the output is discarded, otherwise it is displayed along with the fault.</p>
<p>Uli</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: pitti</title>
		<link>http://www.piware.de/2012/10/python-unittest-show-log-on-test-failure/comment-page-1/#comment-8503</link>
		<dc:creator>pitti</dc:creator>
		<pubDate>Fri, 12 Oct 2012 04:12:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.piware.de/?p=755#comment-8503</guid>
		<description>Marcel,

indeed I do use nose for some of my Python projects; these are tests for gnome-settings-daemon which uses autotools (and is otherwise a C project). But doesn&#039;t this only capture things you already print to stdout/err? What I want is to only show the daemon log for a test that fails.</description>
		<content:encoded><![CDATA[<p>Marcel,</p>
<p>indeed I do use nose for some of my Python projects; these are tests for gnome-settings-daemon which uses autotools (and is otherwise a C project). But doesn&#8217;t this only capture things you already print to stdout/err? What I want is to only show the daemon log for a test that fails.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Marcel Stimberg</title>
		<link>http://www.piware.de/2012/10/python-unittest-show-log-on-test-failure/comment-page-1/#comment-8475</link>
		<dc:creator>Marcel Stimberg</dc:creator>
		<pubDate>Thu, 11 Oct 2012 23:16:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.piware.de/?p=755#comment-8475</guid>
		<description>Ups, that link was missing an l in the end...:
https://nose.readthedocs.org/en/latest/plugins/logcapture.html</description>
		<content:encoded><![CDATA[<p>Ups, that link was missing an l in the end&#8230;:<br />
<a href="https://nose.readthedocs.org/en/latest/plugins/logcapture.html" rel="nofollow">https://nose.readthedocs.org/en/latest/plugins/logcapture.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Marcel Stimberg</title>
		<link>http://www.piware.de/2012/10/python-unittest-show-log-on-test-failure/comment-page-1/#comment-8474</link>
		<dc:creator>Marcel Stimberg</dc:creator>
		<pubDate>Thu, 11 Oct 2012 23:14:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.piware.de/?p=755#comment-8474</guid>
		<description>If you&#039;d be using the nose testing framework (and why would you use anything else :) ?), you&#039;d have this behaviour by default:
https://nose.readthedocs.org/en/latest/plugins/logcapture.htm</description>
		<content:encoded><![CDATA[<p>If you&#8217;d be using the nose testing framework (and why would you use anything else <img src='http://www.piware.de/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ?), you&#8217;d have this behaviour by default:<br />
<a href="https://nose.readthedocs.org/en/latest/plugins/logcapture.htm" rel="nofollow">https://nose.readthedocs.org/en/latest/plugins/logcapture.htm</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
