You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Domingo Aguilera <do...@gmail.com> on 2009/02/24 23:05:41 UTC

Some tests not working in couchdb-python

I've updated couchdb and couchdb-python ( also httplib2 ) from svn
repositories.

Some test python scripts ( client.py and couch_tests.py are not working )?
Are these scripts supposed to be working good or not yet?


Domingo Aguilera

Re: Some tests not working in couchdb-python

Posted by Domingo Aguilera <do...@gmail.com>.
I did a svn update of httplib2.  After that I had to edit setup.py because
every time I did setup.py install (from the svn update version ) the
easy_installed httplib2  remained despite the fact that I was  doing
setup.py install.  So I edited setup.py changed the version name  and now
after running setup.py install  the httplib2 was up to date .   The
important thiing is that I have now the httplib2 module from the svn
repository.

After I changed to the couchdb-python ( from trunk ) and reissued a sudo
python setup.py develop.



On Wed, Feb 25, 2009 at 2:02 PM, Benoit Chesneau <bc...@gmail.com>wrote:

> 2009/2/25 Domingo Aguilera <do...@gmail.com>:
> > Benoit,
> >
> > I edited setup.py to force reinstallation when sudo python setup.py
> install
> > .  Now I am sure it's running httplib2 from the trunk version.
> >
>
> I don't understand. Did you reinstall httplib2 from the trunk? Or did
> you froece reinstall using couchdb-python trunk ?
>

Re: Some tests not working in couchdb-python

Posted by Benoit Chesneau <bc...@gmail.com>.
2009/2/25 Domingo Aguilera <do...@gmail.com>:
> Benoit,
>
> I edited setup.py to force reinstallation when sudo python setup.py install
> .  Now I am sure it's running httplib2 from the trunk version.
>

I don't understand. Did you reinstall httplib2 from the trunk? Or did
you froece reinstall using couchdb-python trunk ?

Re: Some tests not working in couchdb-python

Posted by Domingo Aguilera <do...@gmail.com>.
Benoit,

I edited setup.py to force reinstallation when sudo python setup.py install
.  Now I am sure it's running httplib2 from the trunk version.

Anyway I still have errors.

Tks anyway for the help.

PS Any idea on how should I run the tests?  I cd to .. svnversion/couchdb
and typing nostests -v --with-doctest client.py

On Wed, Feb 25, 2009 at 12:02 PM, Benoit Chesneau <bc...@gmail.com>wrote:

> 2009/2/25 Domingo Aguilera <do...@gmail.com>:
> > I've just done svn update of couchdb ( running now Apache CouchDB
> > 0.9.0a747769 )
> >
> > And the nosetests output of client.py is....
> >
> > http://gist.github.com/70176
> >
>
> Do you use httplib2 from pypi ? For py26 you need to use the trunk for
> now. Joe Gregorio the maintainer of the project commited in it my
> patch that add py26 support some weeks ago. It may solve your problem.
>
> - benoît
>

Re: Some tests not working in couchdb-python

Posted by Benoit Chesneau <bc...@gmail.com>.
2009/2/25 Domingo Aguilera <do...@gmail.com>:
> I've just done svn update of couchdb ( running now Apache CouchDB
> 0.9.0a747769 )
>
> And the nosetests output of client.py is....
>
> http://gist.github.com/70176
>

Do you use httplib2 from pypi ? For py26 you need to use the trunk for
now. Joe Gregorio the maintainer of the project commited in it my
patch that add py26 support some weeks ago. It may solve your problem.

- benoît

Re: Some tests not working in couchdb-python

Posted by Domingo Aguilera <do...@gmail.com>.
I've just done svn update of couchdb ( running now Apache CouchDB
0.9.0a747769 )

And the nosetests output of client.py is....

http://gist.github.com/70176

On Wed, Feb 25, 2009 at 3:58 AM, Christopher Lenz <cm...@gmx.de> wrote:

> On 25.02.2009, at 04:42, Jeff Hinrichs - DM&T wrote:
>
>> couchdb-python 0.5
>>
>> File
>> "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site-packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
>> line 337, in couchdb.client.Database.delete
>> Failed example:
>>   db.delete(doc)
>> Expected:
>>   Traceback (most recent call last):
>>     ...
>>   PreconditionFailed: ('conflict', 'Document update conflict.')
>> Got:
>>   Traceback (most recent call last):
>>     File "/usr/lib/python2.5/doctest.py", line 1228, in __run
>>       compileflags, 1) in test.globs
>>     File "<doctest couchdb.client.Database.delete[7]>", line 1, in
>> <module>
>>       db.delete(doc)
>>     File
>> "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site-packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
>> line 348, in delete
>>       self.resource.delete(doc['_id'], rev=doc['_rev'])
>>     File
>> "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site-packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
>> line 829, in delete
>>       return self._request('DELETE', path, headers=headers, **params)
>>     File
>> "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site-packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
>> line 886, in _request
>>       raise ResourceConflict(error)
>>   ResourceConflict: ('conflict', 'Document update conflict.')
>>
>> Need to replace PreconditionFailed with ResourceConflict
>>
>
> Yeah, that one should have been fixed in trunk:
>
>  <http://code.google.com/p/couchdb-python/source/detail?r=131>
>
> It was caused by a change of conflict status codes in CouchDB trunk.
>
> Cheers,
> Chris
>
> --
> Christopher Lenz
>  cmlenz at gmx.de
>  http://www.cmlenz.net/
>
>

Re: Some tests not working in couchdb-python

Posted by Christopher Lenz <cm...@gmx.de>.
On 25.02.2009, at 04:42, Jeff Hinrichs - DM&T wrote:
> couchdb-python 0.5
>
> File "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site- 
> packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
> line 337, in couchdb.client.Database.delete
> Failed example:
>    db.delete(doc)
> Expected:
>    Traceback (most recent call last):
>      ...
>    PreconditionFailed: ('conflict', 'Document update conflict.')
> Got:
>    Traceback (most recent call last):
>      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
>        compileflags, 1) in test.globs
>      File "<doctest couchdb.client.Database.delete[7]>", line 1, in  
> <module>
>        db.delete(doc)
>      File "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site- 
> packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
> line 348, in delete
>        self.resource.delete(doc['_id'], rev=doc['_rev'])
>      File "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site- 
> packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
> line 829, in delete
>        return self._request('DELETE', path, headers=headers, **params)
>      File "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site- 
> packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
> line 886, in _request
>        raise ResourceConflict(error)
>    ResourceConflict: ('conflict', 'Document update conflict.')
>
> Need to replace PreconditionFailed with ResourceConflict

Yeah, that one should have been fixed in trunk:

   <http://code.google.com/p/couchdb-python/source/detail?r=131>

It was caused by a change of conflict status codes in CouchDB trunk.

Cheers,
Chris
--
Christopher Lenz
   cmlenz at gmx.de
   http://www.cmlenz.net/


Re: Some tests not working in couchdb-python

Posted by Jeff Hinrichs - DM&T <du...@gmail.com>.
On Tue, Feb 24, 2009 at 7:49 PM, Domingo Aguilera
<do...@gmail.com> wrote:
> I have python 2.6 , couchdb-python rev:134, httplib2 rev:276, couchdb rev:
> 747599
>
> The output of client.py test is...
> http://gist.github.com/69938
>
> On Tue, Feb 24, 2009 at 4:20 PM, Christopher Lenz <cm...@gmx.de> wrote:
>
>> On 24.02.2009, at 23:05, Domingo Aguilera wrote:
>>
>>> I've updated couchdb and couchdb-python ( also httplib2 ) from svn
>>> repositories.
>>>
>>> Some test python scripts ( client.py and couch_tests.py are not working )?
>>> Are these scripts supposed to be working good or not yet?
>>>
>>
>> What versions of CouchDB and couchdb-python are you using? Also, can you
>> include the error output from the tests?
>>
>> Cheers,
>> --
>> Christopher Lenz
>>  cmlenz at gmx.de
>>  http://www.cmlenz.net/
couchdb-python 0.5

File "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site-packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
line 337, in couchdb.client.Database.delete
Failed example:
    db.delete(doc)
Expected:
    Traceback (most recent call last):
      ...
    PreconditionFailed: ('conflict', 'Document update conflict.')
Got:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest couchdb.client.Database.delete[7]>", line 1, in <module>
        db.delete(doc)
      File "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site-packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
line 348, in delete
        self.resource.delete(doc['_id'], rev=doc['_rev'])
      File "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site-packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
line 829, in delete
        return self._request('DELETE', path, headers=headers, **params)
      File "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site-packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
line 886, in _request
        raise ResourceConflict(error)
    ResourceConflict: ('conflict', 'Document update conflict.')

Need to replace PreconditionFailed with ResourceConflict

upon making the edit, the tests for client.py run succesfully
(demo-couchdb)jlh@jlh-d520:~/Projects/venvs/demo-couchdb/lib/python2.5/site-packages/CouchDB-0.5-py2.5.egg/couchdb$
nosetests -v --with-doctest client.py
Doctest: couchdb.client ... ok
Doctest: couchdb.client.Database ... ok
Doctest: couchdb.client.Database.delete ... ok
Doctest: couchdb.client.Database.query ... ok
Doctest: couchdb.client.Database.update ... ok
Doctest: couchdb.client.Database.view ... ok
Doctest: couchdb.client.Server ... ok
Doctest: couchdb.client.ViewResults ... ok
Doctest: couchdb.client.uri ... ok

----------------------------------------------------------------------
Ran 9 tests in 1.008s

OK

Re: Some tests not working in couchdb-python

Posted by Domingo Aguilera <do...@gmail.com>.
I have python 2.6 , couchdb-python rev:134, httplib2 rev:276, couchdb rev:
747599

The output of client.py test is...
http://gist.github.com/69938

On Tue, Feb 24, 2009 at 4:20 PM, Christopher Lenz <cm...@gmx.de> wrote:

> On 24.02.2009, at 23:05, Domingo Aguilera wrote:
>
>> I've updated couchdb and couchdb-python ( also httplib2 ) from svn
>> repositories.
>>
>> Some test python scripts ( client.py and couch_tests.py are not working )?
>> Are these scripts supposed to be working good or not yet?
>>
>
> What versions of CouchDB and couchdb-python are you using? Also, can you
> include the error output from the tests?
>
> Cheers,
> --
> Christopher Lenz
>  cmlenz at gmx.de
>  http://www.cmlenz.net/
>
>
>

Re: Some tests not working in couchdb-python

Posted by Christopher Lenz <cm...@gmx.de>.
On 24.02.2009, at 23:05, Domingo Aguilera wrote:
> I've updated couchdb and couchdb-python ( also httplib2 ) from svn
> repositories.
>
> Some test python scripts ( client.py and couch_tests.py are not  
> working )?
> Are these scripts supposed to be working good or not yet?

What versions of CouchDB and couchdb-python are you using? Also, can  
you include the error output from the tests?

Cheers,
--
Christopher Lenz
   cmlenz at gmx.de
   http://www.cmlenz.net/