<div>OK, cool. Now I&#39;ve got something to work with :)</div><div><br></div><div>Arve</div><div><br></div>On Fri, Sep 24, 2010 at 8:13 PM, jason pellerin <span dir="ltr">&lt;<a href="mailto:jpellerin@gmail.com">jpellerin@gmail.com</a>&gt;</span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Great, glad it&#39;s working. That&#39;s a known failing test, demonstrating<br>
that it&#39;s not currently possible (or at least I don&#39;t know how) to<br>
attach extra info to error reports.<br>
<br>
In general I would not expect nose2&#39;s test suite to be passing all the<br>
time until at least unittest2&#39;s plugins branch has a public release,<br>
since we&#39;ll sometimes want to check in failing tests that illustrate<br>
an issue or a bug.<br>
<font color="#888888"><br>
JP<br>
</font><div><div></div><div class="h5"><br>
On Fri, Sep 24, 2010 at 2:07 PM, Arve Knudsen &lt;<a href="mailto:arve.knudsen@gmail.com">arve.knudsen@gmail.com</a>&gt; wrote:<br>
&gt; On Fri, Sep 24, 2010 at 7:37 PM, jason pellerin &lt;<a href="mailto:jpellerin@gmail.com">jpellerin@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; This is probably a packaging error. It works for me in a virtualenv,<br>
&gt;&gt; with nose2 installed via &#39;python setup.py develop&#39; on ubuntu lucid,<br>
&gt;&gt; python 2.6.5. So if you installed via &#39;python setup.py install&#39;<br>
&gt;&gt; because of my poor directions, try &#39;develop&#39; instead. If that doesn&#39;t<br>
&gt;&gt; work it may be a platform problem.<br>
&gt;<br>
&gt; Thanks for that suggestion, &#39;develop&#39; worked well. Now that the nose2<br>
&gt; command works, I get an error in one of your tests (running nose2 in the<br>
&gt; project root):<br>
&gt; ..F..<br>
&gt; ======================================================================<br>
&gt; FAIL: test_layout2<br>
&gt; (nose2.tests.test_logcapture_plugin.LogCaptureFunctionalTest)<br>
&gt; ----------------------------------------------------------------------<br>
&gt; Traceback (most recent call last):<br>
&gt;   File &quot;c:\users\arve\projects\nose2\nose2\tests\test_logcapture_plugin.py&quot;,<br>
&gt; line 17, in test_layout2<br>
&gt;     stderr=match)<br>
&gt;   File &quot;c:\users\arve\projects\nose2\nose2\tests\__init__.py&quot;, line 19, in<br>
&gt; assertTestRunOutputMatches<br>
&gt;     self.assertRegexpMatches(cmd_stderr, stderr)<br>
&gt; AssertionError: Regexp didn&#39;t match: &#39;&gt;&gt; begin captured logging &lt;&lt;&#39; not<br>
&gt; found in &#39;F.F\r\n===============================<br>
&gt; =======================================\r\nFAIL: test_fail2<br>
&gt; (tests.Tests)\r\n-------------------------------------------<br>
&gt; ---------------------------\r\nTraceback (most recent call last):\r\n  File<br>
&gt; &quot;c:\\users\\arve\\projects\\nose2\\support\\<br>
&gt; layout2\\tests.py&quot;, line 23, in test_fail2\r\n<br>
&gt;  self.assertEqual(get_one(), 4)\r\nAssertionError: 1 != 4\r\n\r\n======<br>
&gt; ================================================================\r\nFAIL:<br>
&gt; unittest2.case.FunctionTestCase (test_fail)\r\<br>
&gt; n----------------------------------------------------------------------\r\nTraceback<br>
&gt; (most recent call last):\r\n  File<br>
&gt; &quot;c:\\users\\arve\\projects\\nose2\\support\\layout2\\tests.py&quot;, line 17, in<br>
&gt; test_fail\r\n    assert get_one() == 2\r\nAs<br>
&gt; sertionError\r\n\r\n----------------------------------------------------------------------\r\nRan<br>
&gt; 3 tests in 0.037s\r\n\<br>
&gt; r\nFAILED (failures=2)\r\n&#39;<br>
&gt; ----------------------------------------------------------------------<br>
&gt; Ran 5 tests in 0.199s<br>
&gt; FAILED (failures=1)<br>
&gt;<br>
&gt; Arve<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Sep 24, 2010 at 12:36 PM, Arve Knudsen &lt;<a href="mailto:arve.knudsen@gmail.com">arve.knudsen@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt; I&#39;m using Python 2.6 on Windows 7. I&#39;ve installed unittest2 branch<br>
&gt;&gt; &gt; plugins<br>
&gt;&gt; &gt; and Nose2 branch default. The &#39;nose2&#39; command fails however, like so:<br>
&gt;&gt; &gt; Traceback (most recent call last):<br>
&gt;&gt; &gt;   File &quot;C:\Python26\Scripts\nose2-script.py&quot;, line 8, in &lt;module&gt;<br>
&gt;&gt; &gt;     load_entry_point(&#39;nose2==0.1&#39;, &#39;console_scripts&#39;, &#39;nose2&#39;)()<br>
&gt;&gt; &gt;   File &quot;C:\Python26\lib\site-packages\pkg_resources.py&quot;, line 318, in<br>
&gt;&gt; &gt; load_entry_point<br>
&gt;&gt; &gt;     return get_distribution(dist).load_entry_point(group, name)<br>
&gt;&gt; &gt;   File &quot;C:\Python26\lib\site-packages\pkg_resources.py&quot;, line 2221, in<br>
&gt;&gt; &gt; load_entry_point<br>
&gt;&gt; &gt;     return ep.load()<br>
&gt;&gt; &gt;   File &quot;C:\Python26\lib\site-packages\pkg_resources.py&quot;, line 1954, in<br>
&gt;&gt; &gt; load<br>
&gt;&gt; &gt;     entry = __import__(self.module_name, globals(),globals(),<br>
&gt;&gt; &gt; [&#39;__name__&#39;])<br>
&gt;&gt; &gt; ImportError: No module named nose2<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Before that, I tried &#39;python setup.py nosetests&#39;. This fails like so<br>
&gt;&gt; &gt; (excerpt):<br>
&gt;&gt; &gt; ======================================================================<br>
&gt;&gt; &gt; ERROR: Failure: AttributeError (&#39;NoneType&#39; object has no attribute<br>
&gt;&gt; &gt; &#39;setdefault&#39;)<br>
&gt;&gt; &gt; ----------------------------------------------------------------------<br>
&gt;&gt; &gt; Traceback (most recent call last):<br>
&gt;&gt; &gt;   File<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &quot;C:\Python26\lib\site-packages\nose-0.11.4.dev-py2.6.egg\nose\loader.py&quot;,<br>
&gt;&gt; &gt; line 382, in loadTestsFromName<br>
&gt;&gt; &gt;     addr.filename, addr.module)<br>
&gt;&gt; &gt;   File<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &quot;C:\Python26\lib\site-packages\nose-0.11.4.dev-py2.6.egg\nose\importer.py&quot;,<br>
&gt;&gt; &gt; line 39, in importFromPath<br>
&gt;&gt; &gt;     return self.importFromDir(dir_path, fqname)<br>
&gt;&gt; &gt;   File<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &quot;C:\Python26\lib\site-packages\nose-0.11.4.dev-py2.6.egg\nose\importer.py&quot;,<br>
&gt;&gt; &gt; line 86, in importFromDir<br>
&gt;&gt; &gt;     mod = load_module(part_fqname, fh, filename, desc)<br>
&gt;&gt; &gt;   File &quot;C:\Users\Arve\Projects\Nose2\nose2\plugins\testid.py&quot;, line 7,<br>
&gt;&gt; &gt; in<br>
&gt;&gt; &gt; &lt;module&gt;<br>
&gt;&gt; &gt;     class TestId(Plugin):<br>
&gt;&gt; &gt;   File<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &quot;C:\Python26\lib\site-packages\unittest2-0.6.0.alpha._plugins.branch_-py2.6.egg\unittest2\events.py&quot;,<br>
&gt;&gt; &gt; line 336, i<br>
&gt;&gt; &gt; n __new__<br>
&gt;&gt; &gt;     cls()<br>
&gt;&gt; &gt;   File<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &quot;C:\Python26\lib\site-packages\unittest2-0.6.0.alpha._plugins.branch_-py2.6.egg\unittest2\events.py&quot;,<br>
&gt;&gt; &gt; line 361, i<br>
&gt;&gt; &gt; n __new__<br>
&gt;&gt; &gt;     instance.config = getConfig(configSection)<br>
&gt;&gt; &gt;   File<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &quot;C:\Python26\lib\site-packages\unittest2-0.6.0.alpha._plugins.branch_-py2.6.egg\unittest2\config.py&quot;,<br>
&gt;&gt; &gt; line 28, in<br>
&gt;&gt; &gt;  getConfig<br>
&gt;&gt; &gt;     return _config.setdefault(section, Section(section))<br>
&gt;&gt; &gt; AttributeError: &#39;NoneType&#39; object has no attribute &#39;setdefault&#39;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Arve<br>
&gt;&gt; &gt; On Fri, Sep 24, 2010 at 6:26 PM, jason pellerin &lt;<a href="mailto:jpellerin@gmail.com">jpellerin@gmail.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Good question! :)<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; You&#39;ll need the plugins branch of unittest2 from<br>
&gt;&gt; &gt;&gt; <a href="http://hg.python.org/unittest2" target="_blank">http://hg.python.org/unittest2</a>. With that and nose2 installed (in a<br>
&gt;&gt; &gt;&gt; virtualenv is fine) then you can run nose2&#39;s tests by running &#39;nose2&#39;<br>
&gt;&gt; &gt;&gt; (w/o quotes) from the command line.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; To restrict to unit tests, run nose2 -A tags=unit. To restrict to<br>
&gt;&gt; &gt;&gt; functional tests, run nose2 -A tags=functional. (There is currently<br>
&gt;&gt; &gt;&gt; only one functional test and it fails.) Tests are in the nose2/tests<br>
&gt;&gt; &gt;&gt; package and should be self-explanatory, I hope.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; To play around with test runs, try running nose2 in support/layout1<br>
&gt;&gt; &gt;&gt; and support/layout2.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; As of this moment nose2 requires python 2.6, but I&#39;m about to merge a<br>
&gt;&gt; &gt;&gt; fork that makes it compatible with 2.4-2.6. I haven&#39;t tested yet with<br>
&gt;&gt; &gt;&gt; 2.7, and python3 support is not in yet (issue 16 in the tracker).<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; JP<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; 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;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt; Hi Jason<br>
&gt;&gt; &gt;&gt; &gt; How should one run Nose2&#39;s unittests?<br>
&gt;&gt; &gt;&gt; &gt; Arve<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; On Fri, Sep 24, 2010 at 4:25 PM, jason pellerin &lt;<a href="mailto:jpellerin@gmail.com">jpellerin@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; There are roughly 15 open tickets between here and nose2 0.1.<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &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; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; Who wants to f1rst p0st the AUTHORS file?<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; JP<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; &gt;&gt; testing-in-python mailing list<br>
&gt;&gt; &gt;&gt; &gt;&gt; <a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
&gt;&gt; &gt;&gt; &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;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>