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, "Terry Reedy" <<a href="mailto:tjreedy@udel.edu">tjreedy@udel.edu</a>> wrote:<br>
><br>
><br>
> On 4/9/2012 9:13 AM, r.david.murray wrote:<br>
>><br>
>> <a href="http://hg.python.org/cpython/rev/eff551437abd">http://hg.python.org/cpython/rev/eff551437abd</a><br>
>> changeset: Â 76176:eff551437abd<br>
>> user: Â Â Â Â R David Murray<<a href="mailto:rdmurray@bitdance.com">rdmurray@bitdance.com</a>><br>
>> date: Â Â Â Â Mon Apr 09 08:55:42 2012 -0400<br>
>> summary:<br>
>> Â #14533: if a test has no test_main, use loadTestsFromModule.<br>
>><br>
>> This moves us further in the direction of using normal unittest facilities<br>
>> instead of specialized regrtest ones. Â Any test module that can be correctly<br>
>> run currently using 'python unittest -m test.test_xxx' can now be converted to<br>
>> use normal unittest test loading by simply deleting its test_main, thus no<br>
>> longer requiring manual maintenance of the list of tests to run.<br>
><br>
> ...<br>
>><br>
>> + Â if __name__ == '__main__':<br>
>> + Â Â Â unittest.main()<br>
>><br>
>> - Â if __name__ == '__main__':<br>
>> - Â Â Â test_main()<br>
><br>
><br>
> Being on Windows, I sometimes run single tests interactively with<br>
><br>
> from test import test_xxx as t; t.test_main()<br>
><br>
> Should t.unittest.main(t.__name__) work as well?<br>
> 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>
><br>
> tjr<br>
> _______________________________________________<br>
> Python-Dev mailing list<br>
> <a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
> <a href="http://mail.python.org/mailman/listinfo/python-dev">http://mail.python.org/mailman/listinfo/python-dev</a><br>
> 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