On Wednesday 08 September 2010 08:31:18 Sylvain Thénault wrote:
> > > There is no merge to do, simply stop using
> > > logilab.common(lgc).testlib in tests.
> >
> > You are saying that the difference is solely in how the tests are
> > invoked from the command line?
>
> Unfortunatly not. logilab.common provides two testing modules: testlib
> and pytest. Our unittests are written using testlib (which extends the
> old unittest module with a lot of things like setup/teardown module,
> test skipping, etc...). As those features are now in unittest2, we
> don't want anymore to use this. So this is the first thing to do: use
> unittest2 instead of testlib. Hopefully that shouldn't be a big deal
> but it's still has to be done.
>
> Then, we used to run tests using pytest, which is a tests discover
> tool. Because of pytest tricks, we can't use it with tests written
> using unittest2. I also suppose we can't use discover on tests written
> using testlib (but I've not checked that yet). So one test will be
> written using unittest2, we'll simply have to use unittest2 discover
> tool instead of pytest to launch tests (and ensure it provides the same
> functionnalities we liked in pytest, but that's another topic).
>
> I've no time this week to work on this, but I'll try to find some next
> week.

I might be missing something, but as far as I can see, if we only care 
about pylint-3k, it seems to me easier to translate
pytest to py3k than to make all tests run with unit2:

As I have been told, pytest works with importing unittest2 (hence 
Python3k's unittest) instead of unittest.

On the other side, I had a quick look at running the tests of lgc with the 
python2.6 -3 option :

$ cd logilab/common
$ python2.6 -3 bin/pytest

this yields a couple of seemingly simple issues: I would imagine not more 
than half a day of work.

So if I had to do the job, I would just fix these issues, first give a try 
to make pytest run under py3k (even if it is duplicated code and all)

Removing Pytest from lgc and make all lgc, astng and pylint tests pass 
without pytest is imho a lot of work, and another issue than making 
Pylint run under 3k... 

So, replying to Dan Stromberg, I don't believe "that the conversion will 
of necessity be more complex than what
sa2to3 and perhaps some if's or conditional imports can handle"

Conditional imports already take place in astng; the couple of classes and 
methods to write for astng are syntax independent and might be needed for 
2.7; and there might be some other expectable small modifications 
reflecting the syntax changes.

-- 

Emile Anclin <emile.anc...@logilab.fr>
http://www.logilab.fr/   http://www.logilab.org/ 
Informatique scientifique & et gestion de connaissances
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to