I'm using Python 2.6 on Windows 7. I've installed unittest2 branch plugins and Nose2 branch default. The 'nose2' command fails however, like so:<div><br></div><div><div>Traceback (most recent call last):</div>
<div> File "C:\Python26\Scripts\nose2-script.py", line 8, in <module></div><div> load_entry_point('nose2==0.1', 'console_scripts', 'nose2')()</div><div> File "C:\Python26\lib\site-packages\pkg_resources.py", line 318, in load_entry_point</div>
<div> return get_distribution(dist).load_entry_point(group, name)</div><div> File "C:\Python26\lib\site-packages\pkg_resources.py", line 2221, in load_entry_point</div><div> return ep.load()</div><div> File "C:\Python26\lib\site-packages\pkg_resources.py", line 1954, in load</div>
<div> entry = __import__(self.module_name, globals(),globals(), ['__name__'])</div><div>ImportError: No module named nose2</div><div><br></div><div><br></div><div>Before that, I tried 'python setup.py nosetests'. This fails like so (excerpt):</div>
<div><br></div><div><div>======================================================================</div><div>ERROR: Failure: AttributeError ('NoneType' object has no attribute 'setdefault')</div><div>----------------------------------------------------------------------</div>
<div>Traceback (most recent call last):</div><div> File "C:\Python26\lib\site-packages\nose-0.11.4.dev-py2.6.egg\nose\loader.py", line 382, in loadTestsFromName</div><div> addr.filename, addr.module)</div><div>
File "C:\Python26\lib\site-packages\nose-0.11.4.dev-py2.6.egg\nose\importer.py", line 39, in importFromPath</div><div> return self.importFromDir(dir_path, fqname)</div><div> File "C:\Python26\lib\site-packages\nose-0.11.4.dev-py2.6.egg\nose\importer.py", line 86, in importFromDir</div>
<div> mod = load_module(part_fqname, fh, filename, desc)</div><div> File "C:\Users\Arve\Projects\Nose2\nose2\plugins\testid.py", line 7, in <module></div><div> class TestId(Plugin):</div><div> File "C:\Python26\lib\site-packages\unittest2-0.6.0.alpha._plugins.branch_-py2.6.egg\unittest2\events.py", line 336, i</div>
<div>n __new__</div><div> cls()</div><div> File "C:\Python26\lib\site-packages\unittest2-0.6.0.alpha._plugins.branch_-py2.6.egg\unittest2\events.py", line 361, i</div><div>n __new__</div><div> instance.config = getConfig(configSection)</div>
<div> File "C:\Python26\lib\site-packages\unittest2-0.6.0.alpha._plugins.branch_-py2.6.egg\unittest2\config.py", line 28, in</div><div> getConfig</div><div> return _config.setdefault(section, Section(section))</div>
<div>AttributeError: 'NoneType' object has no attribute 'setdefault'</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"><<a href="mailto:jpellerin@gmail.com">jpellerin@gmail.com</a>></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'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's tests by running 'nose2'<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'm about to merge a<br>
fork that makes it compatible with 2.4-2.6. I haven'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 <<a href="mailto:arve.knudsen@gmail.com">arve.knudsen@gmail.com</a>> wrote:<br>
> Hi Jason<br>
> How should one run Nose2's unittests?<br>
> Arve<br>
><br>
> On Fri, Sep 24, 2010 at 4:25 PM, jason pellerin <<a href="mailto:jpellerin@gmail.com">jpellerin@gmail.com</a>> wrote:<br>
>><br>
>> There are roughly 15 open tickets between here and nose2 0.1.<br>
>><br>
>> <a href="https://bitbucket.org/jpellerin/nose2/issues?status=new&status=open" target="_blank">https://bitbucket.org/jpellerin/nose2/issues?status=new&status=open</a><br>
>><br>
>> Who wants to f1rst p0st the AUTHORS file?<br>
>><br>
>> JP<br>
>><br>
>> _______________________________________________<br>
>> testing-in-python mailing list<br>
>> <a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
>> <a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>