On Mon, Sep 6, 2010 at 1:59 AM, Sylvain Thénault <
sylvain.thena...@logilab.fr> wrote:

> On 28 août 18:42, Dan Stromberg wrote:
> > Aside from skipped mxDateTime issues, I've got only unit test error now:
> >
> > ERROR: test_ustrftime_before_1900 (unittest_date.DateTC)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last)
> >   File
> >
> "/usr/local/cpython-2.5/lib/python2.5/site-packages/logilab/common/testlib.py",
> > line 1245, in _proceed
> >     testfunc(*args, **kwargs)
> >   File "/home/dstromberg/src/pylint-3k/common/test/unittest_date.py",
> line
> > 132, in test_ustrftime_before_1900
> >     self.assertEquals(ustrftime(date, '%Y-%m-%d %H:%M:%S'), u'1328-03-12
> > 06:30:00')
> >   File
> >
> "/usr/local/cpython-2.5/lib/python2.5/site-packages/logilab/common/date.py",
> > line 279, in ustrftime
> >     return unicode(somedate.strftime(str(fmt)), encoding)
> > ValueError: year=1328 is before 1900; the datetime strftime() methods
> > require year >= 1900
> >
> >                               no stdout
> >                               no stderr
> >
> > Naturally, it too is date/time-related.
>
> are you sure you're not testing system installed logilab.common ?

I was.

To get around this, I propose:
1) Make the hierarchy in common's source directory mirror more closely what
goes into site-packages, in particular, making the automatically-created
__init__.py at the top no longer be automatically created.
2) Introduce top-level 2.x and 3.x directories, where the 2.x directory has
the official sources (for now), and 3.x is automatically derived at
"setup.py install" time from 2.x using sa2to3.


> > When is the new unit testing code to arrive?  I'd like to look it over
> soon
>
> it's just a matter of time to 1. switch existing test to unittest2, then to
> 2.
> ensure we can do what we use to do with pytest using discover (and
> eventually
> contribute missing feature). Regarding py3k port, #1 is enough so that we
> can
> just igore lgc.testlib and lgc.pytest modules.

It seems likely that if the unittest2 code isn't merged first, substantial
merge conflicts will result.

That is, assuming that we get pytest working on 3.x.   I'm not sure I
understand why that wouldn't be desireable?

-- 
Dan Stromberg
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to