============================= test session starts ============================== platform linux2 -- Python 2.7.1[pypy-1.6.0-final] -- pytest-2.2.0 collecting ... collected 910 items / 1 errors / 10 skipped MoinMoin/_tests/test_error.py ...... MoinMoin/_tests/test_sourcecode.py ......................................................................................................................................................................................................................................................................... MoinMoin/_tests/test_test_environ.py .. MoinMoin/_tests/test_user.py ......................... MoinMoin/_tests/test_wikiutil.py ................ MoinMoin/apps/admin/_tests/test_admin.py ....... MoinMoin/apps/feed/_tests/test_feed.py .. MoinMoin/apps/frontend/_tests/test_frontend.py ..FF...........................................ssss MoinMoin/apps/misc/_tests/test_misc.py .. MoinMoin/apps/serve/_tests/test_serve.py .. MoinMoin/auth/_tests/test_auth.py ...... MoinMoin/auth/_tests/test_http.py . MoinMoin/auth/_tests/test_log.py ... MoinMoin/config/_tests/test_defaultconfig.py . MoinMoin/converter/_tests/test__args.py ....... MoinMoin/converter/_tests/test__args_wiki.py .... MoinMoin/converter/_tests/test__wiki_macro.py .... MoinMoin/converter/_tests/test_creole_in.py .......... MoinMoin/converter/_tests/test_include.py ... MoinMoin/converter/_tests/test_link.py .... MoinMoin/converter/_tests/test_mediawiki_in.py .... MoinMoin/converter/_tests/test_moinwiki19_in.py .s.F.......... MoinMoin/converter/_tests/test_moinwiki_in.py s.F.......... MoinMoin/converter/_tests/test_moinwiki_out.py ......... MoinMoin/converter/_tests/test_rst_in.py ......... MoinMoin/converter/_tests/test_rst_out.py ........... MoinMoin/converter/_tests/test_smiley.py ssssssss MoinMoin/datastruct/backends/_tests/test_composite_dicts.py .... MoinMoin/datastruct/backends/_tests/test_composite_groups.py ............. MoinMoin/datastruct/backends/_tests/test_config_dicts.py ..... MoinMoin/datastruct/backends/_tests/test_config_groups.py ......... MoinMoin/datastruct/backends/_tests/test_lazy_config_groups.py .................. MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py ..... MoinMoin/datastruct/backends/_tests/test_wiki_groups.py ............. MoinMoin/i18n/_tests/test_i18n.py .. MoinMoin/items/_tests/test_Item.py ....................... MoinMoin/macro/_tests/test_Anchor.py . MoinMoin/macro/_tests/test_Date.py .. MoinMoin/macro/_tests/test_DateTime.py . MoinMoin/macro/_tests/test_GetText.py . MoinMoin/macro/_tests/test_GetVal.py . MoinMoin/macro/_tests/test_Verbatim.py . MoinMoin/macro/_tests/test__base.py .... MoinMoin/mail/_tests/test_sendmail.py ......... MoinMoin/search/_tests/test_analyzers.py ... MoinMoin/security/_tests/test_security.py .................... MoinMoin/security/_tests/test_textcha.py ... MoinMoin/security/_tests/test_ticket.py . MoinMoin/storage/backends/_tests/test_fileserver.py .... MoinMoin/storage/backends/_tests/test_stores.py .......... MoinMoin/storage/middleware/_tests/test_indexing.py ...............ss MoinMoin/storage/middleware/_tests/test_protecting.py ............................. MoinMoin/storage/middleware/_tests/test_routing.py ..... MoinMoin/storage/middleware/_tests/test_serialization.py . MoinMoin/storage/stores/_tests/test_all.py ..ss......ss..ss......ss..ss......ss..ss..FFFFss..ss......ssssssssssssss MoinMoin/storage/stores/_tests/test_fs.py ...... MoinMoin/storage/stores/_tests/test_memory.py ...... MoinMoin/storage/stores/_tests/test_sqlite.py .......... MoinMoin/themes/_tests/test_navi_bar.py ..... MoinMoin/util/_tests/test_crypto.py ........ MoinMoin/util/_tests/test_diff3.py . MoinMoin/util/_tests/test_diff_html.py .. MoinMoin/util/_tests/test_diff_text.py . MoinMoin/util/_tests/test_filesys.py ....s........ MoinMoin/util/_tests/test_forms.py ...... MoinMoin/util/_tests/test_interwiki.py ..... MoinMoin/util/_tests/test_iri.py .................. MoinMoin/util/_tests/test_lock.py ............. MoinMoin/util/_tests/test_md5crypt.py .. MoinMoin/util/_tests/test_mime.py ..... MoinMoin/util/_tests/test_mimetype.py ... MoinMoin/util/_tests/test_paramparser.py .......................F.. MoinMoin/util/_tests/test_pysupport.py ...ss MoinMoin/util/_tests/test_registry.py .. MoinMoin/util/_tests/test_send_file.py . MoinMoin/util/_tests/test_tree.py .... MoinMoin/util/_tests/test_util.py . MoinMoin/util/_tests/test_version.py . ==================================== ERRORS ==================================== _________ ERROR collecting MoinMoin/util/_tests/test_thread_monitor.py _________ MoinMoin/util/_tests/test_thread_monitor.py:13: in > from MoinMoin.util.thread_monitor import Monitor MoinMoin/util/thread_monitor.py:63: in > mon = Monitor() MoinMoin/util/thread_monitor.py:26: in __init__ > assert hasattr(sys, "_current_frames") # make sure we have py >= 2.5 E assert hasattr(sys, '_current_frames') =================================== FAILURES =================================== ________________ TestFrontend.test_ajaxdestroy_item_name_route _________________ self = def test_ajaxdestroy_item_name_route(self): self._test_view_post('frontend.ajaxdestroy', status='200 OK', content_types=['application/json', ], data=['{', '}'], form=dict( comment='Test', itemnames='["DoesntExist"]', > ), viewopts=dict(item_name='DoesntExist')) MoinMoin/apps/frontend/_tests/test_frontend.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = viewname = 'frontend.ajaxdestroy', status = '200 OK' content_types = ['application/json'], data = ['{', '}'] form = {'comment': 'Test', 'itemnames': '["DoesntExist"]'} viewopts = {'item_name': 'DoesntExist'} def _test_view_post(self, viewname, status='302 FOUND', content_types=('text/html; charset=utf-8', ), data=('', ''), form=None, viewopts=None): if viewopts is None: viewopts = {} if form is None: form = {} print 'POST %s' % url_for(viewname, **viewopts) with self.app.test_client() as c: rv = c.post(url_for(viewname, **viewopts), data=form) > assert rv.status == status E assert '500 INTERNAL SERVER ERROR' == '200 OK' E - 500 INTERNAL SERVER ERROR E + 200 OK MoinMoin/apps/frontend/_tests/test_frontend.py:46: AssertionError ------------------------------- Captured stdout -------------------------------- POST /+ajaxdestroy/DoesntExist ------------------------------- Captured stderr -------------------------------- 2011-12-15 15:49:03,500 ERROR MoinMoin:1210 Exception on /+ajaxdestroy/DoesntExist [POST] Traceback (most recent call last): File "/home/moin/moin-2.0/env-pypy-1.6/site-packages/flask/app.py", line 1504, in wsgi_app response = self.full_dispatch_request() File "/home/moin/moin-2.0/env-pypy-1.6/site-packages/flask/app.py", line 1264, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/moin/moin-2.0/env-pypy-1.6/site-packages/flask/app.py", line 1262, in full_dispatch_request rv = self.dispatch_request() File "/home/moin/moin-2.0/env-pypy-1.6/site-packages/flask/app.py", line 1248, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/moin/moin-2.0/MoinMoin/apps/frontend/views.py", line 546, in ajaxdestroy item.destroy(comment=comment, destroy_item=True) File "/home/moin/moin-2.0/MoinMoin/items/__init__.py", line 410, in destroy self.rev.item.destroy_all_revisions() AttributeError: 'DummyItem' object has no attribute 'destroy_all_revisions' _______________ TestFrontend.test_ajaxdestroy_no_item_name_route _______________ self = def test_ajaxdestroy_no_item_name_route(self): self._test_view_post('frontend.ajaxdestroy', status='200 OK', content_types=['application/json', ], data=['{', '}'], form=dict( comment='Test', > itemnames='["DoesntExist"]', MoinMoin/apps/frontend/_tests/test_frontend.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = viewname = 'frontend.ajaxdestroy', status = '200 OK' content_types = ['application/json'], data = ['{', '}'] form = {'comment': 'Test', 'itemnames': '["DoesntExist"]'}, viewopts = {} def _test_view_post(self, viewname, status='302 FOUND', content_types=('text/html; charset=utf-8', ), data=('', ''), form=None, viewopts=None): if viewopts is None: viewopts = {} if form is None: form = {} print 'POST %s' % url_for(viewname, **viewopts) with self.app.test_client() as c: rv = c.post(url_for(viewname, **viewopts), data=form) > assert rv.status == status E assert '500 INTERNAL SERVER ERROR' == '200 OK' E - 500 INTERNAL SERVER ERROR E + 200 OK MoinMoin/apps/frontend/_tests/test_frontend.py:46: AssertionError ------------------------------- Captured stdout -------------------------------- POST /+ajaxdestroy ------------------------------- Captured stderr -------------------------------- 2011-12-15 15:49:03,576 ERROR MoinMoin:1210 Exception on /+ajaxdestroy [POST] Traceback (most recent call last): File "/home/moin/moin-2.0/env-pypy-1.6/site-packages/flask/app.py", line 1504, in wsgi_app response = self.full_dispatch_request() File "/home/moin/moin-2.0/env-pypy-1.6/site-packages/flask/app.py", line 1264, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/moin/moin-2.0/env-pypy-1.6/site-packages/flask/app.py", line 1262, in full_dispatch_request rv = self.dispatch_request() File "/home/moin/moin-2.0/env-pypy-1.6/site-packages/flask/app.py", line 1248, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/moin/moin-2.0/MoinMoin/apps/frontend/views.py", line 546, in ajaxdestroy item.destroy(comment=comment, destroy_item=True) File "/home/moin/moin-2.0/MoinMoin/items/__init__.py", line 410, in destroy self.rev.item.destroy_all_revisions() AttributeError: 'DummyItem' object has no attribute 'destroy_all_revisions' _____________________ TestConverterFormat19.test_emphasis ______________________ self = input = "'''''Mixed'''Emphasis''" output = '

MixedEmphasis

' args = {}, skip = None def do(self, input, output, args={}, skip=None): if skip: pytest.skip(skip) out = self.conv(input, 'text/x.moin.wiki;charset=utf-8', **args) > assert self.serialize(out) == output E assert u'' == '<.../body>' E -

MixedEmphasis

E ? -------- --------------------- --------- E +

MixedEmphasis

E ? ++++++++ + MoinMoin/converter/_tests/test_moinwiki_in.py:317: AssertionError _________________________ TestConverter.test_emphasis __________________________ self = input = "'''''Mixed'''Emphasis''" output = '

MixedEmphasis

' args = {}, skip = None def do(self, input, output, args={}, skip=None): if skip: pytest.skip(skip) out = self.conv(input, 'text/x.moin.wiki;charset=utf-8', **args) > assert self.serialize(out) == output E assert u'' == '<.../body>' E -

MixedEmphasis

E ? -------- --------------------- --------- E +

MixedEmphasis

E ? ++++++++ + MoinMoin/converter/_tests/test_moinwiki_in.py:317: AssertionError _________________________ test_iter[sqlite/BytesStore] _________________________ store = def test_iter(store): kvs = set([('1', 'one'), ('2', 'two'), ('3', 'three'), ]) for k, v in kvs: store[k] = v result = set() > for k in store: MoinMoin/storage/stores/_tests/test_all.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def __iter__(self): > for row in self.conn.execute("select key from {0}".format(self.table_name)): MoinMoin/storage/stores/sqlite.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_sqlite3.Statement object at 0x0000000016c36b60> def next(self): self.con._check_closed() self.con._check_thread() if self.exhausted: raise StopIteration item = self.item ret = sqlite.sqlite3_step(self.statement) if ret == SQLITE_DONE: self.exhausted = True self.item = None elif ret != SQLITE_ROW: exc = self.con._get_exception(ret) sqlite.sqlite3_reset(self.statement) raise exc > self._readahead() /opt/pypy/lib_pypy/_sqlite3.py:1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_sqlite3.Statement object at 0x0000000016c36b60> def _readahead(self): self.column_count = sqlite.sqlite3_column_count(self.statement) row = [] for i in xrange(self.column_count): typ = sqlite.sqlite3_column_type(self.statement, i) converter = self.row_cast_map[i] if converter is None: if typ == SQLITE_INTEGER: val = sqlite.sqlite3_column_int64(self.statement, i) if -sys.maxint-1 <= val <= sys.maxint: val = int(val) elif typ == SQLITE_FLOAT: val = sqlite.sqlite3_column_double(self.statement, i) elif typ == SQLITE_BLOB: blob_len = sqlite.sqlite3_column_bytes(self.statement, i) blob = sqlite.sqlite3_column_blob(self.statement, i) val = buffer(string_at(blob, blob_len)) elif typ == SQLITE_NULL: val = None elif typ == SQLITE_TEXT: val = sqlite.sqlite3_column_text(self.statement, i) val = self.con.text_factory(val) else: blob = sqlite.sqlite3_column_blob(self.statement, i) if not blob: val = None else: blob_len = sqlite.sqlite3_column_bytes(self.statement, i) val = string_at(blob, blob_len) val = converter(val) row.append(val) row = tuple(row) if self.row_factory is not None: > row = self.row_factory(self.cur(), row) /opt/pypy/lib_pypy/_sqlite3.py:1065: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_sqlite3.Row object at 0x0000000016c42ad8>, cursor = None values = (u'2',) def __init__(self, cursor, values): > self.description = cursor.description E AttributeError: 'NoneType' object has no attribute 'description' /opt/pypy/lib_pypy/_sqlite3.py:1091: AttributeError _________________________ test_iter[sqlite/FileStore] __________________________ store = def test_iter(store): kvs = set([('1', 'one'), ('2', 'two'), ('3', 'three'), ]) for k, v in kvs: store[k] = v result = set() > for k in store: MoinMoin/storage/stores/_tests/test_all.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def __iter__(self): > for row in self.conn.execute("select key from {0}".format(self.table_name)): MoinMoin/storage/stores/sqlite.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_sqlite3.Statement object at 0x000000001682a0b0> def next(self): self.con._check_closed() self.con._check_thread() if self.exhausted: raise StopIteration item = self.item ret = sqlite.sqlite3_step(self.statement) if ret == SQLITE_DONE: self.exhausted = True self.item = None elif ret != SQLITE_ROW: exc = self.con._get_exception(ret) sqlite.sqlite3_reset(self.statement) raise exc > self._readahead() /opt/pypy/lib_pypy/_sqlite3.py:1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_sqlite3.Statement object at 0x000000001682a0b0> def _readahead(self): self.column_count = sqlite.sqlite3_column_count(self.statement) row = [] for i in xrange(self.column_count): typ = sqlite.sqlite3_column_type(self.statement, i) converter = self.row_cast_map[i] if converter is None: if typ == SQLITE_INTEGER: val = sqlite.sqlite3_column_int64(self.statement, i) if -sys.maxint-1 <= val <= sys.maxint: val = int(val) elif typ == SQLITE_FLOAT: val = sqlite.sqlite3_column_double(self.statement, i) elif typ == SQLITE_BLOB: blob_len = sqlite.sqlite3_column_bytes(self.statement, i) blob = sqlite.sqlite3_column_blob(self.statement, i) val = buffer(string_at(blob, blob_len)) elif typ == SQLITE_NULL: val = None elif typ == SQLITE_TEXT: val = sqlite.sqlite3_column_text(self.statement, i) val = self.con.text_factory(val) else: blob = sqlite.sqlite3_column_blob(self.statement, i) if not blob: val = None else: blob_len = sqlite.sqlite3_column_bytes(self.statement, i) val = string_at(blob, blob_len) val = converter(val) row.append(val) row = tuple(row) if self.row_factory is not None: > row = self.row_factory(self.cur(), row) /opt/pypy/lib_pypy/_sqlite3.py:1065: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_sqlite3.Row object at 0x000000000dbe4a68>, cursor = None values = (u'2',) def __init__(self, cursor, values): > self.description = cursor.description E AttributeError: 'NoneType' object has no attribute 'description' /opt/pypy/lib_pypy/_sqlite3.py:1091: AttributeError ___________________ test_iter[sqlite:compressed/BytesStore] ____________________ store = def test_iter(store): kvs = set([('1', 'one'), ('2', 'two'), ('3', 'three'), ]) for k, v in kvs: store[k] = v result = set() > for k in store: MoinMoin/storage/stores/_tests/test_all.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def __iter__(self): > for row in self.conn.execute("select key from {0}".format(self.table_name)): MoinMoin/storage/stores/sqlite.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_sqlite3.Statement object at 0x0000000013bea5c0> def next(self): self.con._check_closed() self.con._check_thread() if self.exhausted: raise StopIteration item = self.item ret = sqlite.sqlite3_step(self.statement) if ret == SQLITE_DONE: self.exhausted = True self.item = None elif ret != SQLITE_ROW: exc = self.con._get_exception(ret) sqlite.sqlite3_reset(self.statement) raise exc > self._readahead() /opt/pypy/lib_pypy/_sqlite3.py:1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_sqlite3.Statement object at 0x0000000013bea5c0> def _readahead(self): self.column_count = sqlite.sqlite3_column_count(self.statement) row = [] for i in xrange(self.column_count): typ = sqlite.sqlite3_column_type(self.statement, i) converter = self.row_cast_map[i] if converter is None: if typ == SQLITE_INTEGER: val = sqlite.sqlite3_column_int64(self.statement, i) if -sys.maxint-1 <= val <= sys.maxint: val = int(val) elif typ == SQLITE_FLOAT: val = sqlite.sqlite3_column_double(self.statement, i) elif typ == SQLITE_BLOB: blob_len = sqlite.sqlite3_column_bytes(self.statement, i) blob = sqlite.sqlite3_column_blob(self.statement, i) val = buffer(string_at(blob, blob_len)) elif typ == SQLITE_NULL: val = None elif typ == SQLITE_TEXT: val = sqlite.sqlite3_column_text(self.statement, i) val = self.con.text_factory(val) else: blob = sqlite.sqlite3_column_blob(self.statement, i) if not blob: val = None else: blob_len = sqlite.sqlite3_column_bytes(self.statement, i) val = string_at(blob, blob_len) val = converter(val) row.append(val) row = tuple(row) if self.row_factory is not None: > row = self.row_factory(self.cur(), row) /opt/pypy/lib_pypy/_sqlite3.py:1065: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_sqlite3.Row object at 0x00000000162076a8>, cursor = None values = (u'2',) def __init__(self, cursor, values): > self.description = cursor.description E AttributeError: 'NoneType' object has no attribute 'description' /opt/pypy/lib_pypy/_sqlite3.py:1091: AttributeError ____________________ test_iter[sqlite:compressed/FileStore] ____________________ store = def test_iter(store): kvs = set([('1', 'one'), ('2', 'two'), ('3', 'three'), ]) for k, v in kvs: store[k] = v result = set() > for k in store: MoinMoin/storage/stores/_tests/test_all.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def __iter__(self): > for row in self.conn.execute("select key from {0}".format(self.table_name)): MoinMoin/storage/stores/sqlite.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_sqlite3.Statement object at 0x000000000bb800f8> def next(self): self.con._check_closed() self.con._check_thread() if self.exhausted: raise StopIteration item = self.item ret = sqlite.sqlite3_step(self.statement) if ret == SQLITE_DONE: self.exhausted = True self.item = None elif ret != SQLITE_ROW: exc = self.con._get_exception(ret) sqlite.sqlite3_reset(self.statement) raise exc > self._readahead() /opt/pypy/lib_pypy/_sqlite3.py:1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_sqlite3.Statement object at 0x000000000bb800f8> def _readahead(self): self.column_count = sqlite.sqlite3_column_count(self.statement) row = [] for i in xrange(self.column_count): typ = sqlite.sqlite3_column_type(self.statement, i) converter = self.row_cast_map[i] if converter is None: if typ == SQLITE_INTEGER: val = sqlite.sqlite3_column_int64(self.statement, i) if -sys.maxint-1 <= val <= sys.maxint: val = int(val) elif typ == SQLITE_FLOAT: val = sqlite.sqlite3_column_double(self.statement, i) elif typ == SQLITE_BLOB: blob_len = sqlite.sqlite3_column_bytes(self.statement, i) blob = sqlite.sqlite3_column_blob(self.statement, i) val = buffer(string_at(blob, blob_len)) elif typ == SQLITE_NULL: val = None elif typ == SQLITE_TEXT: val = sqlite.sqlite3_column_text(self.statement, i) val = self.con.text_factory(val) else: blob = sqlite.sqlite3_column_blob(self.statement, i) if not blob: val = None else: blob_len = sqlite.sqlite3_column_bytes(self.statement, i) val = string_at(blob, blob_len) val = converter(val) row.append(val) row = tuple(row) if self.row_factory is not None: > row = self.row_factory(self.cur(), row) /opt/pypy/lib_pypy/_sqlite3.py:1065: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_sqlite3.Row object at 0x00000000109ac528>, cursor = None values = (u'2',) def __init__(self, cursor, values): > self.description = cursor.description E AttributeError: 'NoneType' object has no attribute 'description' /opt/pypy/lib_pypy/_sqlite3.py:1091: AttributeError ______________________ TestExtensionInvoking.testFailing _______________________ self = def testFailing(self): ief = paramparser.invoke_extension_function pytest.raises(TypeError, ief, hex, u'15') pytest.raises(TypeError, ief, cmp, u'15') > pytest.raises(AttributeError, ief, unicode, u'15') MoinMoin/util/_tests/test_paramparser.py:669: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ function = , args = u'15', fixed_args = [] def invoke_extension_function(function, args, fixed_args=[]): """ Parses arguments for an extension call and calls the extension function with the arguments. If the macro function has a default value that is a bool, int, long, float or unicode object, then the given value is converted to the type of that default value before passing it to the macro function. That way, macros need not call the wikiutil.get_* functions for any arguments that have a default. :param function: the function to invoke :param args: unicode string with arguments (or evaluating to False) :param fixed_args: fixed arguments to pass as the first arguments :returns: the return value from the function called """ from inspect import getargspec, isfunction, isclass, ismethod def _convert_arg(value, default, name=None): """ Using the get_* functions, convert argument to the type of the default if that is any of bool, int, long, float or unicode; if the default is the type itself then convert to that type (keeps None) or if the default is a list require one of the list items. In other cases return the value itself. """ # if extending this, extend required_arg as well! if isinstance(default, bool): return get_bool(value, name, default) elif isinstance(default, (int, long)): return get_int(value, name, default) elif isinstance(default, float): return get_float(value, name, default) elif isinstance(default, complex): return get_complex(value, name, default) elif isinstance(default, unicode): return get_unicode(value, name, default) elif isinstance(default, (tuple, list)): return get_choice(value, name, default) elif default is bool: return get_bool(value, name) elif default is int or default is long: return get_int(value, name) elif default is float: return get_float(value, name) elif default is complex: return get_complex(value, name) elif isinstance(default, IEFArgument): # defaults handled later if value is None: return None return default.parse_argument(value) elif isinstance(default, required_arg): if isinstance(default.argtype, (tuple, list)): # treat choice specially and return None if no choice # is given in the value return get_choice(value, name, list(default.argtype), default_none=True) else: return _convert_arg(value, default.argtype, name) return value assert isinstance(fixed_args, (list, tuple)) kwargs = {} kwargs_to_pass = {} trailing_args = [] if args: assert isinstance(args, unicode) positional, keyword, trailing = parse_quoted_separated(args) for kw in keyword: try: kwargs[str(kw)] = keyword[kw] except UnicodeEncodeError: kwargs_to_pass[kw] = keyword[kw] trailing_args.extend(trailing) else: positional = [] if isfunction(function) or ismethod(function): argnames, varargs, varkw, defaultlist = getargspec(function) elif isclass(function): (argnames, varargs, varkw, defaultlist) = getargspec(function.__init__.im_func) else: raise TypeError('function must be a function, method or class') # self is implicit! if ismethod(function) or isclass(function): argnames = argnames[1:] fixed_argc = len(fixed_args) argnames = argnames[fixed_argc:] argc = len(argnames) if not defaultlist: defaultlist = [] # if the fixed parameters have defaults too... if argc < len(defaultlist): defaultlist = defaultlist[fixed_argc:] defstart = argc - len(defaultlist) defaults = {} # reverse to be able to pop() things off positional.reverse() allow_kwargs = False allow_trailing = False # convert all arguments to keyword arguments, # fill all arguments that weren't given with None for idx in range(argc): argname = argnames[idx] if argname == '_kwargs': allow_kwargs = True continue if argname == '_trailing_args': allow_trailing = True continue if positional: kwargs[argname] = positional.pop() if not argname in kwargs: kwargs[argname] = None if idx >= defstart: defaults[argname] = defaultlist[idx - defstart] if positional: if not allow_trailing: > raise ValueError(_('Too many arguments')) E ValueError: Too many arguments MoinMoin/util/paramparser.py:690: ValueError ========= 9 failed, 850 passed, 61 skipped, 1 error in 126.43 seconds ========== real 2m7.532s user 1m49.173s sys 0m2.093s