On Mon, Aug 23, 2010 at 12:13 AM, Sylvain Thénault <
[email protected]> wrote:

> On 20 août 16:24, Dan Stromberg wrote:
> > Where is this "data" directory that pytest complains about in the
> "common"
> > package?  It seems to want a bunch of files in there that I didn't get
> from
> > mercurial.
>
> duh? You should have a common/test/data directory, I get it properly on
> clone.

I'm not sure why, but I appear to have a well-populated common/test/data
directory now.


> > There are things other than the mx.DateTime stuff that is failing in the
> > pytest tests.  Is this a known issue?  Do any of them need to be fixed
> > before getting further into the 3.x port?
>
> All tests are green on my computer (tm), using python 2.5 and 2.6. There
> may be
> some tests depending on some logilab resources, but those one should be
> properly
> skipped. Also, a missing data directory is probably explaining some
> failures...
>
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.

BTW, I tried to modify the wiki page but keep getting an error. Here is
> my 0.2 cents:
>
>    * There appear to be test suites for each of these, which can be invoked
> using bare python or using the pytest command - pytest appears to be part of
> logilab-common, which suggests a bit of
>      mutual dependency to work around. Note both logilab's pytest and
> logilab.common.testlib should be replaced by forthcoming discover/unittest2,
> so this is still ~2700 lines of code we won't have
>      to port.

What sort of wiki error?

When is the new unit testing code to arrive?  I'd like to look it over soon
(but my work situation has changed, so I have a bit less time for pylint :(
).

>
> > Is there a way of running pytest using modules that haven't been setup.py
> > install'd?  It'd be nice if my test iterations didn't have to install
> > repeatedly.  I was hoping that PYTHONPATH=$(pwd) would help, but it
> doesn't
> > appear to due to the module hierarchy.
>
> what's the pb? I have:
>
>  ~/src/logilab/common/.hg
>  ~/src/logilab/astng/.hg
>  ~/src/logilab/__init__.py
>  ~/src/pylint/.hg
>
>  PYTHONPATH=~/src
>
> and everything is fine without installed package


If I run:

/usr/local/cpython-2.5/bin/python2.5 /usr/local/bin/pytest

...I get lots of useful output.

If I run:

/usr/local/cpython-2.5/bin/python2.5 ./pytest.py

...I get no output whatsoever.

-- 
Dan Stromberg
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to