A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20120410/94216a78/attachment.html below:

<p><br>
On Apr 10, 2012 2:36 AM, &quot;Terry Reedy&quot; &lt;<a href="mailto:tjreedy@udel.edu">tjreedy@udel.edu</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; On 4/9/2012 9:13 AM, r.david.murray wrote:<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://hg.python.org/cpython/rev/eff551437abd">http://hg.python.org/cpython/rev/eff551437abd</a><br>
&gt;&gt; changeset: Â  76176:eff551437abd<br>
&gt;&gt; user: Â  Â  Â  Â R David Murray&lt;<a href="mailto:rdmurray@bitdance.com">rdmurray@bitdance.com</a>&gt;<br>
&gt;&gt; date: Â  Â  Â  Â Mon Apr 09 08:55:42 2012 -0400<br>
&gt;&gt; summary:<br>
&gt;&gt; Â  #14533: if a test has no test_main, use loadTestsFromModule.<br>
&gt;&gt;<br>
&gt;&gt; This moves us further in the direction of using normal unittest facilities<br>
&gt;&gt; instead of specialized regrtest ones. Â Any test module that can be correctly<br>
&gt;&gt; run currently using &#39;python unittest -m test.test_xxx&#39; can now be converted to<br>
&gt;&gt; use normal unittest test loading by simply deleting its test_main, thus no<br>
&gt;&gt; longer requiring manual maintenance of the list of tests to run.<br>
&gt;<br>
&gt; ...<br>
&gt;&gt;<br>
&gt;&gt; + Â  if __name__ == &#39;__main__&#39;:<br>
&gt;&gt; + Â  Â  Â  unittest.main()<br>
&gt;&gt;<br>
&gt;&gt; - Â  if __name__ == &#39;__main__&#39;:<br>
&gt;&gt; - Â  Â  Â  test_main()<br>
&gt;<br>
&gt;<br>
&gt; Being on Windows, I sometimes run single tests interactively with<br>
&gt;<br>
&gt; from test import test_xxx as t; t.test_main()<br>
&gt;<br>
&gt; Should t.unittest.main(t.__name__) work as well?<br>
&gt; Should this always work even if there is still a test_main?<br>
Both questions have the same answer. Yes, because this is how discovery works. <br>
&gt;<br>
&gt; tjr<br>
&gt; _______________________________________________<br>
&gt; Python-Dev mailing list<br>
&gt; <a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
&gt; <a href="http://mail.python.org/mailman/listinfo/python-dev">http://mail.python.org/mailman/listinfo/python-dev</a><br>
&gt; Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/anacrolix%40gmail.com">http://mail.python.org/mailman/options/python-dev/anacrolix%40gmail.com</a><br>
</p>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4