I&#39;m using Python 2.6 on Windows 7. I&#39;ve installed unittest2 branch plugins and Nose2 branch default. The &#39;nose2&#39; command fails however, like so:<div><br></div><div><div>Traceback (most recent call last):</div>
<div>  File &quot;C:\Python26\Scripts\nose2-script.py&quot;, line 8, in &lt;module&gt;</div><div>    load_entry_point(&#39;nose2==0.1&#39;, &#39;console_scripts&#39;, &#39;nose2&#39;)()</div><div>  File &quot;C:\Python26\lib\site-packages\pkg_resources.py&quot;, line 318, in load_entry_point</div>
<div>    return get_distribution(dist).load_entry_point(group, name)</div><div>  File &quot;C:\Python26\lib\site-packages\pkg_resources.py&quot;, line 2221, in load_entry_point</div><div>    return ep.load()</div><div>  File &quot;C:\Python26\lib\site-packages\pkg_resources.py&quot;, line 1954, in load</div>
<div>    entry = __import__(self.module_name, globals(),globals(), [&#39;__name__&#39;])</div><div>ImportError: No module named nose2</div><div><br></div><div><br></div><div>Before that, I tried &#39;python setup.py nosetests&#39;. This fails like so (excerpt):</div>
<div><br></div><div><div>======================================================================</div><div>ERROR: Failure: AttributeError (&#39;NoneType&#39; object has no attribute &#39;setdefault&#39;)</div><div>----------------------------------------------------------------------</div>
<div>Traceback (most recent call last):</div><div>  File &quot;C:\Python26\lib\site-packages\nose-0.11.4.dev-py2.6.egg\nose\loader.py&quot;, line 382, in loadTestsFromName</div><div>    addr.filename, addr.module)</div><div>
  File &quot;C:\Python26\lib\site-packages\nose-0.11.4.dev-py2.6.egg\nose\importer.py&quot;, line 39, in importFromPath</div><div>    return self.importFromDir(dir_path, fqname)</div><div>  File &quot;C:\Python26\lib\site-packages\nose-0.11.4.dev-py2.6.egg\nose\importer.py&quot;, line 86, in importFromDir</div>
<div>    mod = load_module(part_fqname, fh, filename, desc)</div><div>  File &quot;C:\Users\Arve\Projects\Nose2\nose2\plugins\testid.py&quot;, line 7, in &lt;module&gt;</div><div>    class TestId(Plugin):</div><div>  File &quot;C:\Python26\lib\site-packages\unittest2-0.6.0.alpha._plugins.branch_-py2.6.egg\unittest2\events.py&quot;, line 336, i</div>
<div>n __new__</div><div>    cls()</div><div>  File &quot;C:\Python26\lib\site-packages\unittest2-0.6.0.alpha._plugins.branch_-py2.6.egg\unittest2\events.py&quot;, line 361, i</div><div>n __new__</div><div>    instance.config = getConfig(configSection)</div>
<div>  File &quot;C:\Python26\lib\site-packages\unittest2-0.6.0.alpha._plugins.branch_-py2.6.egg\unittest2\config.py&quot;, line 28, in</div><div> getConfig</div><div>    return _config.setdefault(section, Section(section))</div>
<div>AttributeError: &#39;NoneType&#39; object has no attribute &#39;setdefault&#39;</div></div><div><br></div><div><br></div><div>Arve</div><br><div class="gmail_quote">On Fri, Sep 24, 2010 at 6:26 PM, jason pellerin <span dir="ltr">&lt;<a href="mailto:jpellerin@gmail.com">jpellerin@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Good question! :)<br>
<br>
You&#39;ll need the plugins branch of unittest2 from<br>
<a href="http://hg.python.org/unittest2" target="_blank">http://hg.python.org/unittest2</a>. With that and nose2 installed (in a<br>
virtualenv is fine) then you can run nose2&#39;s tests by running &#39;nose2&#39;<br>
(w/o quotes) from the command line.<br>
<br>
To restrict to unit tests, run nose2 -A tags=unit. To restrict to<br>
functional tests, run nose2 -A tags=functional. (There is currently<br>
only one functional test and it fails.) Tests are in the nose2/tests<br>
package and should be self-explanatory, I hope.<br>
<br>
To play around with test runs, try running nose2 in support/layout1<br>
and support/layout2.<br>
<br>
As of this moment nose2 requires python 2.6, but I&#39;m about to merge a<br>
fork that makes it compatible with 2.4-2.6. I haven&#39;t tested yet with<br>
2.7, and python3 support is not in yet (issue 16 in the tracker).<br>
<font color="#888888"><br>
JP<br>
</font><div><div></div><div class="h5"><br>
On Fri, Sep 24, 2010 at 12:17 PM, Arve Knudsen &lt;<a href="mailto:arve.knudsen@gmail.com">arve.knudsen@gmail.com</a>&gt; wrote:<br>
&gt; Hi Jason<br>
&gt; How should one run Nose2&#39;s unittests?<br>
&gt; Arve<br>
&gt;<br>
&gt; On Fri, Sep 24, 2010 at 4:25 PM, jason pellerin &lt;<a href="mailto:jpellerin@gmail.com">jpellerin@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; There are roughly 15 open tickets between here and nose2 0.1.<br>
&gt;&gt;<br>
&gt;&gt; <a href="https://bitbucket.org/jpellerin/nose2/issues?status=new&amp;status=open" target="_blank">https://bitbucket.org/jpellerin/nose2/issues?status=new&amp;status=open</a><br>
&gt;&gt;<br>
&gt;&gt; Who wants to f1rst p0st the AUTHORS file?<br>
&gt;&gt;<br>
&gt;&gt; JP<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; testing-in-python mailing list<br>
&gt;&gt; <a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
&gt;&gt; <a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>