============================= test session starts ============================== platform linux2 -- Python 2.7.1[pypy-1.7.0-final] -- pytest-2.2.0 collecting ... collected 912 items / 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............ MoinMoin/converter/_tests/test_moinwiki_in.py s............ 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......ss..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_thread_monitor.py .F MoinMoin/util/_tests/test_tree.py .... MoinMoin/util/_tests/test_util.py . MoinMoin/util/_tests/test_version.py . =================================== 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:59:11,625 ERROR MoinMoin:1210 Exception on /+ajaxdestroy/DoesntExist [POST] Traceback (most recent call last): File "/home/moin/moin-2.0/env-pypy-1.7/site-packages/flask/app.py", line 1504, in wsgi_app response = self.full_dispatch_request() File "/home/moin/moin-2.0/env-pypy-1.7/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.7/site-packages/flask/app.py", line 1262, in full_dispatch_request rv = self.dispatch_request() File "/home/moin/moin-2.0/env-pypy-1.7/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:59:11,713 ERROR MoinMoin:1210 Exception on /+ajaxdestroy [POST] Traceback (most recent call last): File "/home/moin/moin-2.0/env-pypy-1.7/site-packages/flask/app.py", line 1504, in wsgi_app response = self.full_dispatch_request() File "/home/moin/moin-2.0/env-pypy-1.7/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.7/site-packages/flask/app.py", line 1262, in full_dispatch_request rv = self.dispatch_request() File "/home/moin/moin-2.0/env-pypy-1.7/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' ______________________ 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 ________________________ TestMonitor.test_trigger_dump _________________________ self = def test_trigger_dump(self): """ test for trigger_dump """ Monitor_test_obj = Monitor() # activate the hook first Monitor_test_obj.activate_hook() f = open(self.src, "w") result = Monitor_test_obj.trigger_dump(f) # read the content of first line f = open(self.src, "r") f.seek(1) > assert 'Dumping thread' in f.readline() E assert 'Dumping thread' in '' E + where '' = >() E + where > = .readline MoinMoin/util/_tests/test_thread_monitor.py:45: AssertionError ============== 4 failed, 857 passed, 61 skipped in 142.51 seconds ============== real 2m23.673s user 2m2.345s sys 0m1.957s