<div>OK, cool. Now I'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"><<a href="mailto:jpellerin@gmail.com">jpellerin@gmail.com</a>></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's working. That's a known failing test, demonstrating<br>
that it's not currently possible (or at least I don't know how) to<br>
attach extra info to error reports.<br>
<br>
In general I would not expect nose2's test suite to be passing all the<br>
time until at least unittest2's plugins branch has a public release,<br>
since we'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 <<a href="mailto:arve.knudsen@gmail.com">arve.knudsen@gmail.com</a>> wrote:<br>
> On Fri, Sep 24, 2010 at 7:37 PM, jason pellerin <<a href="mailto:jpellerin@gmail.com">jpellerin@gmail.com</a>> wrote:<br>
>><br>
>> This is probably a packaging error. It works for me in a virtualenv,<br>
>> with nose2 installed via 'python setup.py develop' on ubuntu lucid,<br>
>> python 2.6.5. So if you installed via 'python setup.py install'<br>
>> because of my poor directions, try 'develop' instead. If that doesn't<br>
>> work it may be a platform problem.<br>
><br>
> Thanks for that suggestion, 'develop' worked well. Now that the nose2<br>
> command works, I get an error in one of your tests (running nose2 in the<br>
> project root):<br>
> ..F..<br>
> ======================================================================<br>
> FAIL: test_layout2<br>
> (nose2.tests.test_logcapture_plugin.LogCaptureFunctionalTest)<br>
> ----------------------------------------------------------------------<br>
> Traceback (most recent call last):<br>
> File "c:\users\arve\projects\nose2\nose2\tests\test_logcapture_plugin.py",<br>
> line 17, in test_layout2<br>
> stderr=match)<br>
> File "c:\users\arve\projects\nose2\nose2\tests\__init__.py", line 19, in<br>
> assertTestRunOutputMatches<br>
> self.assertRegexpMatches(cmd_stderr, stderr)<br>
> AssertionError: Regexp didn't match: '>> begin captured logging <<' not<br>
> found in 'F.F\r\n===============================<br>
> =======================================\r\nFAIL: test_fail2<br>
> (tests.Tests)\r\n-------------------------------------------<br>
> ---------------------------\r\nTraceback (most recent call last):\r\n File<br>
> "c:\\users\\arve\\projects\\nose2\\support\\<br>
> layout2\\tests.py", line 23, in test_fail2\r\n<br>
> self.assertEqual(get_one(), 4)\r\nAssertionError: 1 != 4\r\n\r\n======<br>
> ================================================================\r\nFAIL:<br>
> unittest2.case.FunctionTestCase (test_fail)\r\<br>
> n----------------------------------------------------------------------\r\nTraceback<br>
> (most recent call last):\r\n File<br>
> "c:\\users\\arve\\projects\\nose2\\support\\layout2\\tests.py", line 17, in<br>
> test_fail\r\n assert get_one() == 2\r\nAs<br>
> sertionError\r\n\r\n----------------------------------------------------------------------\r\nRan<br>
> 3 tests in 0.037s\r\n\<br>
> r\nFAILED (failures=2)\r\n'<br>
> ----------------------------------------------------------------------<br>
> Ran 5 tests in 0.199s<br>
> FAILED (failures=1)<br>
><br>
> Arve<br>
><br>
>><br>
>> On Fri, Sep 24, 2010 at 12:36 PM, Arve Knudsen <<a href="mailto:arve.knudsen@gmail.com">arve.knudsen@gmail.com</a>><br>
>> wrote:<br>
>> > I'm using Python 2.6 on Windows 7. I've installed unittest2 branch<br>
>> > plugins<br>
>> > and Nose2 branch default. The 'nose2' command fails however, like so:<br>
>> > Traceback (most recent call last):<br>
>> > File "C:\Python26\Scripts\nose2-script.py", line 8, in <module><br>
>> > load_entry_point('nose2==0.1', 'console_scripts', 'nose2')()<br>
>> > File "C:\Python26\lib\site-packages\pkg_resources.py", line 318, in<br>
>> > load_entry_point<br>
>> > return get_distribution(dist).load_entry_point(group, name)<br>
>> > File "C:\Python26\lib\site-packages\pkg_resources.py", line 2221, in<br>
>> > load_entry_point<br>
>> > return ep.load()<br>
>> > File "C:\Python26\lib\site-packages\pkg_resources.py", line 1954, in<br>
>> > load<br>
>> > entry = __import__(self.module_name, globals(),globals(),<br>
>> > ['__name__'])<br>
>> > ImportError: No module named nose2<br>
>> ><br>
>> > Before that, I tried 'python setup.py nosetests'. This fails like so<br>
>> > (excerpt):<br>
>> > ======================================================================<br>
>> > ERROR: Failure: AttributeError ('NoneType' object has no attribute<br>
>> > 'setdefault')<br>
>> > ----------------------------------------------------------------------<br>
>> > Traceback (most recent call last):<br>
>> > File<br>
>> ><br>
>> > "C:\Python26\lib\site-packages\nose-0.11.4.dev-py2.6.egg\nose\loader.py",<br>
>> > line 382, in loadTestsFromName<br>
>> > addr.filename, addr.module)<br>
>> > File<br>
>> ><br>
>> > "C:\Python26\lib\site-packages\nose-0.11.4.dev-py2.6.egg\nose\importer.py",<br>
>> > line 39, in importFromPath<br>
>> > return self.importFromDir(dir_path, fqname)<br>
>> > File<br>
>> ><br>
>> > "C:\Python26\lib\site-packages\nose-0.11.4.dev-py2.6.egg\nose\importer.py",<br>
>> > line 86, in importFromDir<br>
>> > mod = load_module(part_fqname, fh, filename, desc)<br>
>> > File "C:\Users\Arve\Projects\Nose2\nose2\plugins\testid.py", line 7,<br>
>> > in<br>
>> > <module><br>
>> > class TestId(Plugin):<br>
>> > File<br>
>> ><br>
>> > "C:\Python26\lib\site-packages\unittest2-0.6.0.alpha._plugins.branch_-py2.6.egg\unittest2\events.py",<br>
>> > line 336, i<br>
>> > n __new__<br>
>> > cls()<br>
>> > File<br>
>> ><br>
>> > "C:\Python26\lib\site-packages\unittest2-0.6.0.alpha._plugins.branch_-py2.6.egg\unittest2\events.py",<br>
>> > line 361, i<br>
>> > n __new__<br>
>> > instance.config = getConfig(configSection)<br>
>> > File<br>
>> ><br>
>> > "C:\Python26\lib\site-packages\unittest2-0.6.0.alpha._plugins.branch_-py2.6.egg\unittest2\config.py",<br>
>> > line 28, in<br>
>> > getConfig<br>
>> > return _config.setdefault(section, Section(section))<br>
>> > AttributeError: 'NoneType' object has no attribute 'setdefault'<br>
>> ><br>
>> > Arve<br>
>> > On Fri, Sep 24, 2010 at 6:26 PM, jason pellerin <<a href="mailto:jpellerin@gmail.com">jpellerin@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> 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>
>> >><br>
>> >> JP<br>
>> >><br>
>> >> On Fri, Sep 24, 2010 at 12:17 PM, Arve Knudsen <<a href="mailto:arve.knudsen@gmail.com">arve.knudsen@gmail.com</a>><br>
>> >> 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>><br>
>> >> > 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>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br>