Skip to content

Instantly share code, notes, and snippets.

@batok
Created February 25, 2009 13:50
Show Gist options
  • Save batok/70176 to your computer and use it in GitHub Desktop.
Save batok/70176 to your computer and use it in GitHub Desktop.
~/couchdb_python_26_svn/couchdb director$ nosetests -v --with-doctest client.py
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ToscaWidgets-0.9.5dev_20081026-py2.6.egg/tw/core/view.py:202: DeprecationWarning: object.__new__() takes no parameters
obj = object.__new__(cls, *args, **kw)
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PEAK_Rules-0.5a1.dev_r2582-py2.6.egg/peak/rules/indexing.py:220: DeprecationWarning: object.__new__() takes no parameters
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/httplib2-0.4.0-py2.6.egg/httplib2/__init__.py:29: DeprecationWarning: the md5 module is deprecated; use hashlib instead
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/httplib2-0.4.0-py2.6.egg/httplib2/__init__.py:44: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
Doctest: couchdb.client ... ok
Doctest: couchdb.client.Database ... ok
Doctest: couchdb.client.Database.delete ... ok
Doctest: couchdb.client.Database.query ... FAIL
Doctest: couchdb.client.Database.update ... ok
Doctest: couchdb.client.Database.view ... ok
Doctest: couchdb.client.Server ... ok
Doctest: couchdb.client.ViewResults ... FAIL
Doctest: couchdb.client.uri ... ok
======================================================================
FAIL: Doctest: couchdb.client.Database.query
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 2131, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for couchdb.client.Database.query
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 454, in query
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 466, in couchdb.client.Database.query
Failed example:
for row in db.query(map_fun):
print row.key
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.Database.query[6]>", line 1, in <module>
for row in db.query(map_fun):
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 898, in _request
raise ServerError((status_code, error))
ServerError: (500, ('badmatch', '{{bad_return_value,{os_process_error,{exit_status,133}}},\n {gen_server,call,\n [<0.3583.0>,\n {prompt,[<<"add_fun">>,\n <<"function(doc) {\\n if (doc.type == \'Person\')\\n emit(doc.name, null);\\n}">>]}]}}'))
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 471, in couchdb.client.Database.query
Failed example:
for row in db.query(map_fun, descending=True):
print row.key
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.Database.query[7]>", line 1, in <module>
for row in db.query(map_fun, descending=True):
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 898, in _request
raise ServerError((status_code, error))
ServerError: (500, ('badmatch', '{{bad_return_value,{os_process_error,{exit_status,133}}},\n {gen_server,call,\n [<0.3590.0>,\n {prompt,[<<"add_fun">>,\n <<"function(doc) {\\n if (doc.type == \'Person\')\\n emit(doc.name, null);\\n}">>]}]}}'))
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 476, in couchdb.client.Database.query
Failed example:
for row in db.query(map_fun, key='John Doe'):
print row.key
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.Database.query[8]>", line 1, in <module>
for row in db.query(map_fun, key='John Doe'):
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 898, in _request
raise ServerError((status_code, error))
ServerError: (500, ('badmatch', '{{bad_return_value,{os_process_error,{exit_status,133}}},\n {gen_server,call,\n [<0.3595.0>,\n {prompt,[<<"add_fun">>,\n <<"function(doc) {\\n if (doc.type == \'Person\')\\n emit(doc.name, null);\\n}">>]}]}}'))
======================================================================
FAIL: Doctest: couchdb.client.ViewResults
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 2131, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for couchdb.client.ViewResults
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 668, in ViewResults
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 689, in couchdb.client.ViewResults
Failed example:
len(results)
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.ViewResults[7]>", line 1, in <module>
len(results)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 742, in __len__
return len(self.rows)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 898, in _request
raise ServerError((status_code, error))
ServerError: (500, ('badmatch', '{{bad_return_value,{os_process_error,{exit_status,133}}},\n {gen_server,call,\n [<0.3633.0>,\n {prompt,[<<"add_fun">>,\n <<"function(doc) {\\n emit([doc.type, doc.name], doc.name);\\n}">>]}]}}'))
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 696, in couchdb.client.ViewResults
Failed example:
for person in people:
print person.value
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.ViewResults[9]>", line 1, in <module>
for person in people:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 877, in _request
resp, data = _make_request()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 872, in _make_request
body=body, headers=headers)
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 1050, in request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 854, in _request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 831, in _conn_request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 715, in connect
error: [Errno 61] Connection refused
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 700, in couchdb.client.ViewResults
Failed example:
people.total_rows, people.offset
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.ViewResults[10]>", line 1, in <module>
people.total_rows, people.offset
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 762, in _get_total_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 877, in _request
resp, data = _make_request()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 872, in _make_request
body=body, headers=headers)
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 1050, in request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 854, in _request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 823, in _conn_request
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 874, in request
self._send_request(method, url, body, headers)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 911, in _send_request
self.endheaders()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 868, in endheaders
self._send_output()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 740, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 699, in send
self.connect()
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 715, in connect
error: [Errno 61] Connection refused
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 707, in couchdb.client.ViewResults
Failed example:
list(results[['City', 'Gotham City']])
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.ViewResults[11]>", line 1, in <module>
list(results[['City', 'Gotham City']])
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 877, in _request
resp, data = _make_request()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 872, in _make_request
body=body, headers=headers)
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 1050, in request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 854, in _request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 823, in _conn_request
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 874, in request
self._send_request(method, url, body, headers)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 911, in _send_request
self.endheaders()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 868, in endheaders
self._send_output()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 740, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 699, in send
self.connect()
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 715, in connect
error: [Errno 61] Connection refused
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 710, in couchdb.client.ViewResults
Failed example:
del server['python-tests']
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.ViewResults[12]>", line 1, in <module>
del server['python-tests']
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 151, in __delitem__
self.resource.delete(validate_dbname(name))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 837, in delete
return self._request('DELETE', path, headers=headers, **params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 877, in _request
resp, data = _make_request()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 872, in _make_request
body=body, headers=headers)
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 1050, in request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 854, in _request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 831, in _conn_request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 715, in connect
error: [Errno 61] Connection refused
----------------------------------------------------------------------
Ran 9 tests in 6.231s
FAILED (failures=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment