bottlepy / bottle

bottle.py is a fast and simple micro-framework for python web-applications.
http://bottlepy.org/
MIT License
8.37k stars 1.46k forks source link

0.12.18: test suite is failing #1243

Closed kloczek closed 2 years ago

kloczek commented 3 years ago

I've copied to may package test procedure which is in Fedora package however it fails. How bottle should be tested? I see tox.ini file however looks like under python >= 3.8 nothing is tested.

``` + cd bottle-0.12.18 + /usr/bin/python3 test/testall.py verbose /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:53: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 128: # Import error /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 3: # Port in use test__header (test_auth.TestBasicAuth) ... ok test_load_dict (test_config.TestConfDict) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_config.py:39: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.foo'], 5) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_config.py:40: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.bar'], 6) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_config.py:41: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.baz'], 7) ok test_meta (test_config.TestConfDict) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_config.py:32: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['int'], 6) ok test_namespaces (test_config.TestConfDict) ... ok test_update (test_config.TestConfDict) ... ok test_write (test_config.TestConfDict) ... ok test_attr_access (test_configdict.TestConfigDict) ConfigDict allow attribute access to keys. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:30: DeprecationWarning: Attribute assignment is deprecated. c.test = 5 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:31: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.test) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:34: DeprecationWarning: Attribute access is deprecated. self.assertEqual(6, c.test) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:38: DeprecationWarning: Attribute access is deprecated. self.assertEqual(None, c.test) ok test_call (test_configdict.TestConfigDict) Calling updates and returns the dict. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:61: DeprecationWarning: Calling ConfDict is deprecated. Use the update() method. self.assertEqual(c, c(a=1)) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:63: DeprecationWarning: Attribute access is deprecated. self.assertEqual(1, c.a) ok test_isadict (test_configdict.TestConfigDict) ConfigDict should behaves like a normal dict. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:12: DeprecationWarning: Constructor does no longer accept parameters. d, m = dict(a=5), ConfigDict(a=5) ok test_issue588 (test_configdict.TestConfigDict) `ConfigDict` namespaces break route options ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:70: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] self.assertEqual('c', c['a']['b']) /usr/lib64/python3.8/_collections_abc.py:744: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] yield (key, self._mapping[key]) ok test_issue720 (test_configdict.TestConfigDict) Accept unicode keys. ... ok test_namespaces (test_configdict.TestConfigDict) Access to a non-existent uppercase attribute creates a new namespace. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:43: DeprecationWarning: Attribute access is deprecated. self.assertEqual(ConfigDict.Namespace, c.Name.Space.__class__) /usr/lib64/python3.8/_collections_abc.py:660: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] return self[key] /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:44: DeprecationWarning: Attribute access is deprecated. c.Name.Space.value = 5 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:44: DeprecationWarning: Attribute assignment is deprecated. c.Name.Space.value = 5 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:45: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name.Space.value) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:46: DeprecationWarning: Attribute access is deprecated. self.assertTrue('value' in c.Name.Space) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:47: DeprecationWarning: Attribute access is deprecated. self.assertTrue('Space' in c.Name) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:51: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'Name', 5)) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:53: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'keys', 5)) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_configdict.py:56: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name) ok test_string_key_only (test_configdict.TestConfigDict) ... ok test_request (test_contextlocals.TestThreadLocals) ... ok test_response (test_contextlocals.TestThreadLocals) ... ok test_absolute_path (test_environ.TestRedirect) ... ok test_host_http_1_0 (test_environ.TestRedirect) ... ok test_host_http_1_1 (test_environ.TestRedirect) ... ok test_host_http_proxy (test_environ.TestRedirect) ... ok test_redirect_preserve_cookies (test_environ.TestRedirect) ... ok test_relative_path (test_environ.TestRedirect) ... ok test_sheme (test_environ.TestRedirect) ... ok test_specialchars (test_environ.TestRedirect) The target URL is not quoted automatically. ... ok test_app_property (test_environ.TestRequest) ... ok test_auth (test_environ.TestRequest) ... ok test_bigbody (test_environ.TestRequest) Environ: Request.body should handle big uploads using files ... ok test_body (test_environ.TestRequest) Environ: Request.body should behave like a file object factory ... ok test_body_noclose (test_environ.TestRequest) Test that the body file handler is not closed after request.POST ... ok test_bodypost (test_environ.TestRequest) ... ok test_chunked (test_environ.TestRequest) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_environ.py:302: DeprecationWarning: Please use assertEqual instead. self.assertEquals(tob(expect), BaseRequest(e).body.read()) ok test_chunked_illegal_size (test_environ.TestRequest) ... ok test_chunked_meta_fields (test_environ.TestRequest) ... ok test_chunked_not_chunked_at_all (test_environ.TestRequest) ... ok test_chunked_not_terminated (test_environ.TestRequest) ... ok test_chunked_wrong_size (test_environ.TestRequest) ... ok test_cookie_dict (test_environ.TestRequest) Environ: Cookie dict ... ok test_dict_access (test_environ.TestRequest) Environ: request objects are environment dicts ... ok test_get (test_environ.TestRequest) Environ: GET data ... ok test_getpostleak (test_environ.TestRequest) Environ: GET and POST should not leak into each other ... ok test_header_access (test_environ.TestRequest) Environ: Request objects decode headers ... ok test_header_access_special (test_environ.TestRequest) ... ok test_isajax (test_environ.TestRequest) ... ok test_json_empty (test_environ.TestRequest) Environ: Request.json property with empty body. ... ok test_json_forged_header_issue616 (test_environ.TestRequest) ... ok test_json_header_empty_body (test_environ.TestRequest) Request Content-Type is application/json but body is empty ... ok test_json_noheader (test_environ.TestRequest) Environ: Request.json property with missing content-type header. ... ok test_json_tobig (test_environ.TestRequest) Environ: Request.json property with huge body. ... ok test_json_valid (test_environ.TestRequest) Environ: Request.json property. ... ok test_method (test_environ.TestRequest) ... ok test_multipart (test_environ.TestRequest) Environ: POST (multipart files and multible values per key) ... /usr/lib64/python3.8/genericpath.py:30: ResourceWarning: unclosed file <_io.FileIO name=3 mode='rb+' closefd=True> st = os.stat(path) ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_params (test_environ.TestRequest) Environ: GET and POST are combined in request.param ... ok test_path (test_environ.TestRequest) PATH_INFO normalization. ... ok test_pathshift (test_environ.TestRequest) Request.path_shift() ... ok test_post (test_environ.TestRequest) Environ: POST data ... ok test_readonly_environ (test_environ.TestRequest) ... ok test_remote_addr (test_environ.TestRequest) ... ok test_remote_route (test_environ.TestRequest) ... ok test_route_property (test_environ.TestRequest) ... ok test_script_name (test_environ.TestRequest) SCRIPT_NAME normalization. ... ok test_tobigbody (test_environ.TestRequest) Environ: Request.body should truncate to Content-Length bytes ... ok test_url (test_environ.TestRequest) Environ: URL building ... ok test_url_for_property (test_environ.TestRequest) ... ok test_user_defined_attributes (test_environ.TestRequest) ... ok test_append_header (test_environ.TestResponse) ... ok test_charset (test_environ.TestResponse) ... ok test_constructor_body (test_environ.TestResponse) ... ok test_constructor_headerlist (test_environ.TestResponse) ... ok test_constructor_status (test_environ.TestResponse) ... ok test_content_type (test_environ.TestResponse) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_environ.py:581: DeprecationWarning: Please use assertEqual instead. self.assertEquals('test/some', rs.headers.get('Content-Type')) ok test_delete_cookie (test_environ.TestResponse) ... FAIL test_delete_header (test_environ.TestResponse) ... ok test_expires_header (test_environ.TestResponse) ... ok test_non_string_header (test_environ.TestResponse) ... ok test_prevent_control_characters_in_headers (test_environ.TestResponse) ... ok test_set_cookie (test_environ.TestResponse) ... ok test_set_cookie_expires (test_environ.TestResponse) ... ok test_set_cookie_maxage (test_environ.TestResponse) ... ok test_set_header (test_environ.TestResponse) ... ok test_set_status (test_environ.TestResponse) ... ok test_bytes (test_environ.TestWSGIHeaderDict) ... ok test_dict (test_environ.TestWSGIHeaderDict) ... ok test_empty (test_environ.TestWSGIHeaderDict) ... ok test_native (test_environ.TestWSGIHeaderDict) ... ok test_unicode (test_environ.TestWSGIHeaderDict) ... ok test_content_type (test_fileupload.TestFileUpload) ... ok test_filename (test_fileupload.TestFileUpload) ... ok test_name (test_fileupload.TestFileUpload) ... ok test_preserve_case_issue_582 (test_fileupload.TestFileUpload) ... ok test_raw_filename (test_fileupload.TestFileUpload) ... ok test_save_buffer (test_fileupload.TestFileUpload) ... /usr/lib64/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_fileupload.py'> method() ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_save_dir (test_fileupload.TestFileUpload) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_fileupload.py:67: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/tmp2jm10rky/test_fileupload.py'> self.assertEqual(fu.file.read(), open(filepath, 'rb').read()) ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_save_file (test_fileupload.TestFileUpload) ... /usr/lib64/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedRandom name=4> method() ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_save_overwrite_lock (test_fileupload.TestFileUpload) ... ok test_attr_access (test_formsdict.TestFormsDict) FomsDict.attribute returs string values as unicode. ... ok test_attr_missing (test_formsdict.TestFormsDict) FomsDict.attribute returs u'' on missing keys. ... ok test_attr_unicode_error (test_formsdict.TestFormsDict) FomsDict.attribute returs u'' on UnicodeError. ... ok test_decode_method (test_formsdict.TestFormsDict) ... ok test_data_import (test_importhook.TestImportHooks) ... ok test_direkt_import (test_importhook.TestImportHooks) ... ok test_ext_isfile (test_importhook.TestImportHooks) The virtual module needs a valid __file__ attribute. ... ok test_from_import (test_importhook.TestImportHooks) ... ok test_import_fail (test_importhook.TestImportHooks) Test a simple static page with this server adapter. ... ok test_custom_filters (test_jinja2.TestJinja2Template) Templates: jinja2 custom filters ... ok test_custom_tests (test_jinja2.TestJinja2Template) Templates: jinja2 custom tests ... ok test_error (test_jinja2.TestJinja2Template) Templates: Exceptions ... ok test_file (test_jinja2.TestJinja2Template) Templates: Jinja2 file ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/bottle.py:3230: DeprecationWarning: The template lookup path list should not be empty. self.filename = self.search(self.name, self.lookup) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/bottle.py:3345: DeprecationWarning: The template lookup path list should not be empty. fname = self.search(name, self.lookup) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/bottle.py:3345: DeprecationWarning: Absolute template path names are deprecated. fname = self.search(name, self.lookup) ok test_inherit (test_jinja2.TestJinja2Template) Templates: Jinja2 lookup and inherience ... ok test_name (test_jinja2.TestJinja2Template) Templates: Jinja2 lookup by name ... ok test_notfound (test_jinja2.TestJinja2Template) Templates: Unavailable templates ... ok test_string (test_jinja2.TestJinja2Template) Templates: Jinja2 string ... ok test_template_shortcut (test_jinja2.TestJinja2Template) ... ok test_view_decorator (test_jinja2.TestJinja2Template) ... ok test_error (test_mako.TestMakoTemplate) Templates: Exceptions ... ok test_file (test_mako.TestMakoTemplate) Templates: Mako file ... ok test_inherit (test_mako.TestMakoTemplate) Templates: Mako lookup and inherience ... ok test_name (test_mako.TestMakoTemplate) Templates: Mako lookup by name ... ok test_notfound (test_mako.TestMakoTemplate) Templates: Unavailable templates ... ok test_string (test_mako.TestMakoTemplate) Templates: Mako string ... ok test_template_shortcut (test_mako.TestMakoTemplate) ... ok test_view_decorator (test_mako.TestMakoTemplate) ... ok test_headergetbug (test_mdict.TestMultiDict) Assure HeaderDict.get() to be case insensitive ... ok test_isadict (test_mdict.TestMultiDict) MultiDict should behaves like a normal dict ... ok test_isheader (test_mdict.TestMultiDict) HeaderDict replaces by default and title()s its keys ... ok test_ismulti (test_mdict.TestMultiDict) MultiDict has some special features ... ok test_merge (test_mount.TestAppMerging) ... ok test_mount (test_mount.TestAppMounting) ... ok test_mount_json_bug (test_mount.TestAppMounting) ... ok test_mount_meta (test_mount.TestAppMounting) ... ok test_mount_no_plugins (test_mount.TestAppMounting) ... ok test_mount_order_bug581 (test_mount.TestAppMounting) ... ok test_mount_wsgi (test_mount.TestAppMounting) ... ok test_mount_wsgi_ctype_bug (test_mount.TestAppMounting) ... ok test_no_slash_prefix (test_mount.TestAppMounting) ... ok test_bytearray (test_outputfilter.TestOutputFilter) ... ok test_bytes (test_outputfilter.TestOutputFilter) ... ok test_cookie (test_outputfilter.TestOutputFilter) WSGI: Cookies ... ok test_empty_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_emptylist (test_outputfilter.TestOutputFilter) ... ok test_error (test_outputfilter.TestOutputFilter) ... ok test_error_in_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_fatal_error (test_outputfilter.TestOutputFilter) ... ok test_fatal_error_in_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_file (test_outputfilter.TestOutputFilter) ... ok test_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_httperror_in_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_httpresponse_in_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_illegal (test_outputfilter.TestOutputFilter) ... ok test_invalid_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_iterator_with_close (test_outputfilter.TestOutputFilter) ... ok test_json (test_outputfilter.TestOutputFilter) ... ok test_json_HTTPError (test_outputfilter.TestOutputFilter) ... ok test_json_HTTPResponse (test_outputfilter.TestOutputFilter) ... ok test_json_serialization_error (test_outputfilter.TestOutputFilter) Verify that 500 errors serializing dictionaries don't return ... ok test_none (test_outputfilter.TestOutputFilter) ... ok test_tuple (test_outputfilter.TestOutputFilter) ... ok test_unicode (test_outputfilter.TestOutputFilter) ... ok test_unicode_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_apply (test_plugins.TestPluginAPI) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/bottle.py:533: DeprecationWarning: Switch to Plugin API v2 and access the Route object directly. context = self if api > 1 else self._context ok test_callable (test_plugins.TestPluginAPI) ... ok test_close (test_plugins.TestPluginAPI) ... ok test_instance_method_wrapper (test_plugins.TestPluginAPI) ... ok test_setup (test_plugins.TestPluginAPI) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_plugins.py:198: DeprecationWarning: Please use assertEqual instead. self.assertEquals(getattr(plugin, 'app', None), self.app) ok test_install_decorator (test_plugins.TestPluginManagement) ... ok test_install_non_plugin (test_plugins.TestPluginManagement) ... ok test_install_plugin (test_plugins.TestPluginManagement) ... ok test_plugin_oder (test_plugins.TestPluginManagement) ... ok test_route_plugin (test_plugins.TestPluginManagement) ... ok test_skip_all (test_plugins.TestPluginManagement) ... ok test_skip_by_class (test_plugins.TestPluginManagement) ... ok test_skip_by_instance (test_plugins.TestPluginManagement) ... ok test_skip_by_name (test_plugins.TestPluginManagement) ... ok test_skip_nonlist (test_plugins.TestPluginManagement) ... ok test_uninstall_all (test_plugins.TestPluginManagement) ... ok test_uninstall_by_instance (test_plugins.TestPluginManagement) ... ok test_uninstall_by_name (test_plugins.TestPluginManagement) ... ok test_uninstall_by_type (test_plugins.TestPluginManagement) ... ok test_get (test_resources.TestResourceManager) ... ok test_open (test_resources.TestResourceManager) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_resources.py:76: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_resources.py' mode='r' encoding='UTF-8'> self.assertEqual(fp.read(), open(__file__).read()) ResourceWarning: Enable tracemalloc to get the object allocation traceback /usr/lib64/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_resources.py' mode='r' encoding='UTF-8'> method() ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_path_absolutize (test_resources.TestResourceManager) ... ok test_path_create (test_resources.TestResourceManager) ... ok test_path_normalize (test_resources.TestResourceManager) ... ok test_path_order (test_resources.TestResourceManager) ... ok test_path_unique (test_resources.TestResourceManager) ... ok test_root_path (test_resources.TestResourceManager) ... ok test_callback_inspection (test_route.TestRoute) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/bottle.py:557: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() return getargspec(self.get_undecorated_callback())[0] ok testBasic (test_router.TestRouter) ... ok testBuild (test_router.TestRouter) ... ok testBuildAnon (test_router.TestRouter) ... ok testBuildFilter (test_router.TestRouter) ... ok testErrorInPattern (test_router.TestRouter) ... ok testFloatFilter (test_router.TestRouter) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/bottle.py:386: RuntimeWarning: Route > overwrites a previously defined route warnings.warn(msg % (method, rule), RuntimeWarning) ok testIntFilter (test_router.TestRouter) ... ok testNewSyntax (test_router.TestRouter) ... ok testParentheses (test_router.TestRouter) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/bottle.py:386: RuntimeWarning: Route overwrites a previously defined route warnings.warn(msg % (method, rule), RuntimeWarning) ok testPathFilter (test_router.TestRouter) ... ok testValueErrorInFilter (test_router.TestRouter) ... ok testWildcardNames (test_router.TestRouter) ... ok test_any_static_before_dynamic (test_router.TestRouter) Static ANY routes have higher priority than dynamic ANY routes. ... ok test_dynamic_any_if_method_exists (test_router.TestRouter) Check dynamic ANY routes if the matching method is known, ... ok test_dynamic_before_static_any (test_router.TestRouter) Static ANY routes have lower priority than dynamic GET routes. ... ok test_lots_of_routes (test_router.TestRouter) ... ok testBasic (test_router.TestRouterInCGIMode) ... ok testBuild (test_router.TestRouterInCGIMode) ... ok testBuildAnon (test_router.TestRouterInCGIMode) ... ok testBuildFilter (test_router.TestRouterInCGIMode) ... ok testErrorInPattern (test_router.TestRouterInCGIMode) ... ok testFloatFilter (test_router.TestRouterInCGIMode) ... ok testIntFilter (test_router.TestRouterInCGIMode) ... ok testNewSyntax (test_router.TestRouterInCGIMode) ... ok testParentheses (test_router.TestRouterInCGIMode) ... ok testPathFilter (test_router.TestRouterInCGIMode) ... ok testValueErrorInFilter (test_router.TestRouterInCGIMode) ... ok testWildcardNames (test_router.TestRouterInCGIMode) ... ok test_any_static_before_dynamic (test_router.TestRouterInCGIMode) Static ANY routes have higher priority than dynamic ANY routes. ... ok test_dynamic_any_if_method_exists (test_router.TestRouterInCGIMode) Check dynamic ANY routes if the matching method is known, ... ok test_dynamic_before_static_any (test_router.TestRouterInCGIMode) Static ANY routes have lower priority than dynamic GET routes. ... ok test_lots_of_routes (test_router.TestRouterInCGIMode) ... ok testDeEncode (test_securecookies.TestSecureCookies) ... ok testIsEncoded (test_securecookies.TestSecureCookies) ... ok testValid (test_securecookies.TestSecureCookiesInBottle) ... ok testWrongKey (test_securecookies.TestSecureCookiesInBottle) ... ok test_asctime (test_sendfile.TestDateParser) DateParser: asctime format ... ok test_bad (test_sendfile.TestDateParser) DateParser: Bad format ... ok test_rfc1123 (test_sendfile.TestDateParser) DateParser: RFC 1123 format ... ok test_rfc850 (test_sendfile.TestDateParser) DateParser: RFC 850 format ... ok test_download (test_sendfile.TestSendFile) SendFile: Download as attachment ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py:85: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py'> f = static_file(os.path.basename(__file__), root='./') ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py:86: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py'> self.assertEqual(open(__file__,'rb').read(), f.body.read()) ResourceWarning: Enable tracemalloc to get the object allocation traceback /usr/lib64/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py'> method() ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_ims (test_sendfile.TestSendFile) SendFile: If-Modified-Since ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py:77: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py'> self.assertEqual(open(__file__,'rb').read(), static_file(os.path.basename(__file__), root='./').body.read()) ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_invalid (test_sendfile.TestSendFile) SendFile: Invalid requests ... ok test_mime (test_sendfile.TestSendFile) SendFile: Mime Guessing ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py:62: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py'> f = static_file(os.path.basename(__file__), root='./', mimetype='some/type') ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py:64: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py'> f = static_file(os.path.basename(__file__), root='./', mimetype='text/foo') ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py:66: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py'> f = static_file(os.path.basename(__file__), root='./', mimetype='text/foo', charset='latin1') ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_range (test_sendfile.TestSendFile) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py:93: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py'> self.assertEqual(c.read(16), tob('').join(f.body)) ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py:94: ResourceWarning: unclosed file <_io.BufferedReader name='test_sendfile.py'> self.assertEqual('bytes 10-25/%d' % len(open(basename, 'rb').read()), ResourceWarning: Enable tracemalloc to get the object allocation traceback /usr/lib64/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedReader name='test_sendfile.py'> method() ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_range_parser (test_sendfile.TestSendFile) ... ok test_valid (test_sendfile.TestSendFile) SendFile: Valid requests ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py:43: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_sendfile.py'> self.assertEqual(open(__file__,'rb').read(), out.body.read()) ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_simple (test_server.MeinheldServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'meinheld' test (ImportError). ok /usr/lib64/python3.8/unittest/suite.py:84: ResourceWarning: unclosed file <_io.BufferedReader name=3> return self.run(*args, **kwds) ResourceWarning: Enable tracemalloc to get the object allocation traceback /usr/lib64/python3.8/unittest/suite.py:84: ResourceWarning: unclosed file <_io.BufferedReader name=5> return self.run(*args, **kwds) ResourceWarning: Enable tracemalloc to get the object allocation traceback test_simple (test_server.TestBjoernServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'bjoern' test (ImportError). ok test_simple (test_server.TestCherryPyServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'cherrypy' test (ImportError). ok test_simple (test_server.TestDieselServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'diesel' test (ImportError). ok test_simple (test_server.TestEventletServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'eventlet' test (ImportError). ok test_simple (test_server.TestFapwsServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'fapws3' test (ImportError). ok test_simple (test_server.TestGeventServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'gevent' test (ImportError). ok test_simple (test_server.TestGunicornServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'gunicorn' test (ImportError). ok test_simple (test_server.TestPasteServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_simple (test_server.TestRocketServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'rocket' test (ImportError). ok test_simple (test_server.TestServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_simple (test_server.TestTornadoServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'tornado' test (ImportError). ok test_simple (test_server.TestTwistedServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_defect_coding (test_stpl.TestSTPLDir) ... ok test_multiline_block (test_stpl.TestSTPLDir) ... ok test_multiline_comprehensions_in_code_line (test_stpl.TestSTPLDir) ... ok test_multiline_eob_after_end (test_stpl.TestSTPLDir) ... ok test_multiline_eob_in_single_line_code (test_stpl.TestSTPLDir) ... ok test_multiline_find_eob_in_comments (test_stpl.TestSTPLDir) ... ok test_multiline_ignore_eob_in_string (test_stpl.TestSTPLDir) ... ok test_multiline_indention (test_stpl.TestSTPLDir) ... ok test_multiline_strings_in_code_line (test_stpl.TestSTPLDir) ... ok test_old_include (test_stpl.TestSTPLDir) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/bottle.py:3584: DeprecationWarning: The include and rebase keywords are functions now. line, comment = self.fix_backward_compatibility(line, comment) ok test_old_include_with_args (test_stpl.TestSTPLDir) ... ok test_blocks (test_stpl.TestSimpleTemplate) Templates: Code blocks and loops ... ok test_bug_block_keywords_eat_prefixed_code (test_stpl.TestSimpleTemplate) #595: Everything before an 'if' statement is removed, resulting in ... ok test_bug_no_whitespace_before_stmt (test_stpl.TestSimpleTemplate) ... ok test_coding_stress (test_stpl.TestSimpleTemplate) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/bottle.py:3584: DeprecationWarning: PEP263 encoding strings in templates are deprecated. line, comment = self.fix_backward_compatibility(line, comment) ok test_commentbug (test_stpl.TestSimpleTemplate) A "#" sign within an string is not a comment ... ok test_commentonly (test_stpl.TestSimpleTemplate) Templates: Commentd should behave like code-lines (e.g. flush text-lines) ... ok test_data (test_stpl.TestSimpleTemplate) Templates: Data representation ... ok test_dedentbug (test_stpl.TestSimpleTemplate) One-Line dednet blocks should not change indention ... ok test_defnied (test_stpl.TestSimpleTemplate) ... ok test_detect_pep263 (test_stpl.TestSimpleTemplate) PEP263 strings in code-lines change the template encoding on the fly ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/bottle.py:195: DeprecationWarning: Template encodings other than utf8 are no longer supported. value = obj.__dict__[self.func.__name__] = self.func(obj) ok test_elsebug (test_stpl.TestSimpleTemplate) Whirespace between block keyword and colon is allowed ... ok test_error (test_stpl.TestSimpleTemplate) Templates: Exceptions ... ok test_escape (test_stpl.TestSimpleTemplate) ... ok test_escaped_codelines (test_stpl.TestSimpleTemplate) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/bottle.py:3378: DeprecationWarning: Escape code lines with a backslash. code = parser.translate() ok test_file (test_stpl.TestSimpleTemplate) ... ok test_get (test_stpl.TestSimpleTemplate) ... ok test_global_config (test_stpl.TestSimpleTemplate) ... ok test_htmlutils_quote (test_stpl.TestSimpleTemplate) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_stpl.py:55: DeprecationWarning: Please use assertEqual instead. self.assertEquals('"<' "\\>"', html_quote('<\'\r\n\t"\\>')); ok test_ignore_late_pep263 (test_stpl.TestSimpleTemplate) PEP263 strings must appear within the first two lines ... ok test_ignore_pep263_in_textline (test_stpl.TestSimpleTemplate) PEP263 strings in text-lines have no effect ... ok test_import (test_stpl.TestSimpleTemplate) Templates: import statement ... ok test_include (test_stpl.TestSimpleTemplate) Templates: Include statements ... ok test_multiline (test_stpl.TestSimpleTemplate) Block statements with non-terminating newlines ... ok test_name (test_stpl.TestSimpleTemplate) ... ok test_newline_in_parameterlist (test_stpl.TestSimpleTemplate) Block statements with non-terminating newlines in list ... ok test_nobreak (test_stpl.TestSimpleTemplate) Templates: Nobreak statements ... ok test_noescape (test_stpl.TestSimpleTemplate) ... ok test_noescape_setting (test_stpl.TestSimpleTemplate) ... ok test_nonobreak (test_stpl.TestSimpleTemplate) Templates: Escaped nobreak statements ... ok test_notfound (test_stpl.TestSimpleTemplate) Templates: Unavailable templates ... ok test_onelineblocks (test_stpl.TestSimpleTemplate) Templates: one line code blocks ... ok test_onelinebugs (test_stpl.TestSimpleTemplate) One-Line blocks should not change indention ... ok test_rebase (test_stpl.TestSimpleTemplate) Templates: %rebase and method passing ... ok test_self_as_variable_name (test_stpl.TestSimpleTemplate) ... ok test_setdefault (test_stpl.TestSimpleTemplate) ... ok test_string (test_stpl.TestSimpleTemplate) Templates: Parse string ... ok test_template_shortcut (test_stpl.TestSimpleTemplate) ... ok test_unicode (test_stpl.TestSimpleTemplate) ... ok test_unicode_code (test_stpl.TestSimpleTemplate) Templates: utf8 code in file ... ok test_view_decorator (test_stpl.TestSimpleTemplate) ... ok test_view_decorator_issue_407 (test_stpl.TestSimpleTemplate) ... ok test_winbreaks (test_stpl.TestSimpleTemplate) Templates: Test windows line breaks ... ok test_winbreaks_end_bug (test_stpl.TestSimpleTemplate) ... ok test_module_shortcuts (test_wsgi.TestAppShortcuts) ... ok test_module_shortcuts_with_different_name (test_wsgi.TestAppShortcuts) ... ok test_autoroute (test_wsgi.TestDecorators) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/bottle.py:2648: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() spec = getargspec(func) ok test_routebuild (test_wsgi.TestDecorators) WSGI: Test route builder ... ok test_truncate_body (test_wsgi.TestDecorators) WSGI: Some HTTP status codes must not be used with a response-body ... ok test_view (test_wsgi.TestDecorators) WSGI: Test view-decorator (should override autojson) ... ok test_view_error (test_wsgi.TestDecorators) WSGI: Test if view-decorator reacts on non-dict return values correctly. ... ok test_apply (test_wsgi.TestRouteDecorator) ... ok test_apply_list (test_wsgi.TestRouteDecorator) ... ok test_callback (test_wsgi.TestRouteDecorator) ... ok test_decorators (test_wsgi.TestRouteDecorator) ... ok test_hooks (test_wsgi.TestRouteDecorator) ... ok test_method (test_wsgi.TestRouteDecorator) ... ok test_method_list (test_wsgi.TestRouteDecorator) ... ok test_name (test_wsgi.TestRouteDecorator) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_wsgi.py:259: DeprecationWarning: Please use assertEqual instead. self.assertEquals('/test/6', bottle.url('foo', x=6)) ok test_no_params_at_all (test_wsgi.TestRouteDecorator) ... ok test_no_path (test_wsgi.TestRouteDecorator) ... ok test_path_list (test_wsgi.TestRouteDecorator) ... ok test_single_path (test_wsgi.TestRouteDecorator) ... ok test_template (test_wsgi.TestRouteDecorator) ... ok test_template_opts (test_wsgi.TestRouteDecorator) ... ok test_303 (test_wsgi.TestWsgi) WSGI: redirect (HTTP 303) ... ok test_401 (test_wsgi.TestWsgi) WSGI: abort(401, '') (HTTP 401) ... ok test_500 (test_wsgi.TestWsgi) WSGI: Exceptions within handler code (HTTP 500) ... ok test_500_unicode (test_wsgi.TestWsgi) ... ok test_anymethod (test_wsgi.TestWsgi) ... ok test_cookie (test_wsgi.TestWsgi) WSGI: Cookies ... ok test_generator_callback (test_wsgi.TestWsgi) ... ok test_get (test_wsgi.TestWsgi) WSGI: GET routes ... ok test_headget (test_wsgi.TestWsgi) WSGI: HEAD routes and GET fallback ... ok test_post (test_wsgi.TestWsgi) WSGI: POST routes ... ok test_request_attrs (test_wsgi.TestWsgi) WSGI: POST routes ... ok test_utf8_404 (test_wsgi.TestWsgi) ... ok test_utf8_url (test_wsgi.TestWsgi) WSGI: UTF-8 Characters in the URL ... ok ====================================================================== FAIL: test_delete_cookie (test_environ.TestResponse) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/bottle-0.12.18/test/test_environ.py", line 627, in test_delete_cookie self.assertTrue('name=;' in cookies[0]) AssertionError: False is not true ---------------------------------------------------------------------- Ran 333 tests in 5.004s FAILED (failures=1) ```

Some warning says that code needs to be updated for python >= 3.8.

BubaVV commented 3 years ago

But test run by Tox passed correctly

FedericoCeratto commented 3 years ago

test_delete_cookie fails on Debian on Python 3.9.1 and Bottle 0.12.19 as well.

defnull commented 3 years ago

That's just a broken test. It was fixed, but not back-portet to 0.12.

kloczek commented 3 years ago

Just tested 1.2.19 and it still fails

``` + cd bottle-0.12.19 + /usr/bin/python3 test/testall.py verbose /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:53: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 128: # Import error /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 3: # Port in use test__header (test_auth.TestBasicAuth) ... ok test_load_dict (test_config.TestConfDict) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:39: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.foo'], 5) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:40: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.bar'], 6) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:41: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.baz'], 7) ok test_meta (test_config.TestConfDict) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:32: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['int'], 6) ok test_namespaces (test_config.TestConfDict) ... ok test_update (test_config.TestConfDict) ... ok test_write (test_config.TestConfDict) ... ok test_attr_access (test_configdict.TestConfigDict) ConfigDict allow attribute access to keys. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:30: DeprecationWarning: Attribute assignment is deprecated. c.test = 5 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:31: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.test) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:34: DeprecationWarning: Attribute access is deprecated. self.assertEqual(6, c.test) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:38: DeprecationWarning: Attribute access is deprecated. self.assertEqual(None, c.test) ok test_call (test_configdict.TestConfigDict) Calling updates and returns the dict. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:61: DeprecationWarning: Calling ConfDict is deprecated. Use the update() method. self.assertEqual(c, c(a=1)) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:63: DeprecationWarning: Attribute access is deprecated. self.assertEqual(1, c.a) ok test_isadict (test_configdict.TestConfigDict) ConfigDict should behaves like a normal dict. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:12: DeprecationWarning: Constructor does no longer accept parameters. d, m = dict(a=5), ConfigDict(a=5) ok test_issue588 (test_configdict.TestConfigDict) `ConfigDict` namespaces break route options ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:70: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] self.assertEqual('c', c['a']['b']) /usr/lib64/python3.8/_collections_abc.py:744: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] yield (key, self._mapping[key]) ok test_issue720 (test_configdict.TestConfigDict) Accept unicode keys. ... ok test_namespaces (test_configdict.TestConfigDict) Access to a non-existent uppercase attribute creates a new namespace. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:43: DeprecationWarning: Attribute access is deprecated. self.assertEqual(ConfigDict.Namespace, c.Name.Space.__class__) /usr/lib64/python3.8/_collections_abc.py:660: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] return self[key] /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:44: DeprecationWarning: Attribute access is deprecated. c.Name.Space.value = 5 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:44: DeprecationWarning: Attribute assignment is deprecated. c.Name.Space.value = 5 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:45: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name.Space.value) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:46: DeprecationWarning: Attribute access is deprecated. self.assertTrue('value' in c.Name.Space) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:47: DeprecationWarning: Attribute access is deprecated. self.assertTrue('Space' in c.Name) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:51: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'Name', 5)) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:53: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'keys', 5)) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:56: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name) ok test_string_key_only (test_configdict.TestConfigDict) ... ok test_request (test_contextlocals.TestThreadLocals) ... ok test_response (test_contextlocals.TestThreadLocals) ... ok test_absolute_path (test_environ.TestRedirect) ... ok test_host_http_1_0 (test_environ.TestRedirect) ... ok test_host_http_1_1 (test_environ.TestRedirect) ... ok test_host_http_proxy (test_environ.TestRedirect) ... ok test_redirect_preserve_cookies (test_environ.TestRedirect) ... ok test_relative_path (test_environ.TestRedirect) ... ok test_sheme (test_environ.TestRedirect) ... ok test_specialchars (test_environ.TestRedirect) The target URL is not quoted automatically. ... ok test_app_property (test_environ.TestRequest) ... ok test_auth (test_environ.TestRequest) ... ok test_bigbody (test_environ.TestRequest) Environ: Request.body should handle big uploads using files ... ok test_body (test_environ.TestRequest) Environ: Request.body should behave like a file object factory ... ok test_body_noclose (test_environ.TestRequest) Test that the body file handler is not closed after request.POST ... ok test_bodypost (test_environ.TestRequest) ... ok test_chunked (test_environ.TestRequest) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_environ.py:302: DeprecationWarning: Please use assertEqual instead. self.assertEquals(tob(expect), BaseRequest(e).body.read()) ok test_chunked_illegal_size (test_environ.TestRequest) ... ok test_chunked_meta_fields (test_environ.TestRequest) ... ok test_chunked_not_chunked_at_all (test_environ.TestRequest) ... ok test_chunked_not_terminated (test_environ.TestRequest) ... ok test_chunked_wrong_size (test_environ.TestRequest) ... ok test_cookie_dict (test_environ.TestRequest) Environ: Cookie dict ... ok test_dict_access (test_environ.TestRequest) Environ: request objects are environment dicts ... ok test_get (test_environ.TestRequest) Environ: GET data ... ok test_getpostleak (test_environ.TestRequest) Environ: GET and POST should not leak into each other ... ok test_header_access (test_environ.TestRequest) Environ: Request objects decode headers ... ok test_header_access_special (test_environ.TestRequest) ... ok test_isajax (test_environ.TestRequest) ... ok test_json_empty (test_environ.TestRequest) Environ: Request.json property with empty body. ... ok test_json_forged_header_issue616 (test_environ.TestRequest) ... ok test_json_header_empty_body (test_environ.TestRequest) Request Content-Type is application/json but body is empty ... ok test_json_noheader (test_environ.TestRequest) Environ: Request.json property with missing content-type header. ... ok test_json_tobig (test_environ.TestRequest) Environ: Request.json property with huge body. ... ok test_json_valid (test_environ.TestRequest) Environ: Request.json property. ... ok test_method (test_environ.TestRequest) ... ok test_multipart (test_environ.TestRequest) Environ: POST (multipart files and multible values per key) ... /usr/lib64/python3.8/mimetypes.py:93: ResourceWarning: unclosed file <_io.FileIO name=3 mode='rb+' closefd=True> exts = self.types_map_inv[strict].setdefault(type, []) ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_params (test_environ.TestRequest) Environ: GET and POST are combined in request.param ... ok test_path (test_environ.TestRequest) PATH_INFO normalization. ... ok test_pathshift (test_environ.TestRequest) Request.path_shift() ... ok test_post (test_environ.TestRequest) Environ: POST data ... ok test_readonly_environ (test_environ.TestRequest) ... ok test_remote_addr (test_environ.TestRequest) ... ok test_remote_route (test_environ.TestRequest) ... ok test_route_property (test_environ.TestRequest) ... ok test_script_name (test_environ.TestRequest) SCRIPT_NAME normalization. ... ok test_tobigbody (test_environ.TestRequest) Environ: Request.body should truncate to Content-Length bytes ... ok test_url (test_environ.TestRequest) Environ: URL building ... ok test_url_for_property (test_environ.TestRequest) ... ok test_user_defined_attributes (test_environ.TestRequest) ... ok test_append_header (test_environ.TestResponse) ... ok test_charset (test_environ.TestResponse) ... ok test_constructor_body (test_environ.TestResponse) ... ok test_constructor_headerlist (test_environ.TestResponse) ... ok test_constructor_status (test_environ.TestResponse) ... ok test_content_type (test_environ.TestResponse) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_environ.py:581: DeprecationWarning: Please use assertEqual instead. self.assertEquals('test/some', rs.headers.get('Content-Type')) ok test_delete_cookie (test_environ.TestResponse) ... FAIL test_delete_header (test_environ.TestResponse) ... ok test_expires_header (test_environ.TestResponse) ... ok test_non_string_header (test_environ.TestResponse) ... ok test_prevent_control_characters_in_headers (test_environ.TestResponse) ... ok test_set_cookie (test_environ.TestResponse) ... ok test_set_cookie_expires (test_environ.TestResponse) ... ok test_set_cookie_maxage (test_environ.TestResponse) ... ok test_set_header (test_environ.TestResponse) ... ok test_set_status (test_environ.TestResponse) ... ok test_bytes (test_environ.TestWSGIHeaderDict) ... ok test_dict (test_environ.TestWSGIHeaderDict) ... ok test_empty (test_environ.TestWSGIHeaderDict) ... ok test_native (test_environ.TestWSGIHeaderDict) ... ok test_unicode (test_environ.TestWSGIHeaderDict) ... ok test_content_type (test_fileupload.TestFileUpload) ... ok test_filename (test_fileupload.TestFileUpload) ... ok test_name (test_fileupload.TestFileUpload) ... ok test_preserve_case_issue_582 (test_fileupload.TestFileUpload) ... ok test_raw_filename (test_fileupload.TestFileUpload) ... ok test_save_buffer (test_fileupload.TestFileUpload) ... /usr/lib64/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_fileupload.py'> method() ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_save_dir (test_fileupload.TestFileUpload) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_fileupload.py:67: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/tmpzh33kwz2/test_fileupload.py'> self.assertEqual(fu.file.read(), open(filepath, 'rb').read()) ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_save_file (test_fileupload.TestFileUpload) ... /usr/lib64/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedRandom name=4> method() ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_save_overwrite_lock (test_fileupload.TestFileUpload) ... ok test_attr_access (test_formsdict.TestFormsDict) FomsDict.attribute returs string values as unicode. ... ok test_attr_missing (test_formsdict.TestFormsDict) FomsDict.attribute returs u'' on missing keys. ... ok test_attr_unicode_error (test_formsdict.TestFormsDict) FomsDict.attribute returs u'' on UnicodeError. ... ok test_decode_method (test_formsdict.TestFormsDict) ... ok test_data_import (test_importhook.TestImportHooks) ... ok test_direkt_import (test_importhook.TestImportHooks) ... ok test_ext_isfile (test_importhook.TestImportHooks) The virtual module needs a valid __file__ attribute. ... ok test_from_import (test_importhook.TestImportHooks) ... ok test_import_fail (test_importhook.TestImportHooks) Test a simple static page with this server adapter. ... ok test_custom_filters (test_jinja2.TestJinja2Template) Templates: jinja2 custom filters ... ok test_custom_tests (test_jinja2.TestJinja2Template) Templates: jinja2 custom tests ... ok test_error (test_jinja2.TestJinja2Template) Templates: Exceptions ... ok test_file (test_jinja2.TestJinja2Template) Templates: Jinja2 file ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:3230: DeprecationWarning: The template lookup path list should not be empty. self.filename = self.search(self.name, self.lookup) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:3345: DeprecationWarning: The template lookup path list should not be empty. fname = self.search(name, self.lookup) /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:3345: DeprecationWarning: Absolute template path names are deprecated. fname = self.search(name, self.lookup) ok test_inherit (test_jinja2.TestJinja2Template) Templates: Jinja2 lookup and inherience ... ok test_name (test_jinja2.TestJinja2Template) Templates: Jinja2 lookup by name ... ok test_notfound (test_jinja2.TestJinja2Template) Templates: Unavailable templates ... ok test_string (test_jinja2.TestJinja2Template) Templates: Jinja2 string ... ok test_template_shortcut (test_jinja2.TestJinja2Template) ... ok test_view_decorator (test_jinja2.TestJinja2Template) ... ok test_error (test_mako.TestMakoTemplate) Templates: Exceptions ... ok test_file (test_mako.TestMakoTemplate) Templates: Mako file ... ok test_inherit (test_mako.TestMakoTemplate) Templates: Mako lookup and inherience ... ok test_name (test_mako.TestMakoTemplate) Templates: Mako lookup by name ... ok test_notfound (test_mako.TestMakoTemplate) Templates: Unavailable templates ... ok test_string (test_mako.TestMakoTemplate) Templates: Mako string ... ok test_template_shortcut (test_mako.TestMakoTemplate) ... ok test_view_decorator (test_mako.TestMakoTemplate) ... ok test_headergetbug (test_mdict.TestMultiDict) Assure HeaderDict.get() to be case insensitive ... ok test_isadict (test_mdict.TestMultiDict) MultiDict should behaves like a normal dict ... ok test_isheader (test_mdict.TestMultiDict) HeaderDict replaces by default and title()s its keys ... ok test_ismulti (test_mdict.TestMultiDict) MultiDict has some special features ... ok test_merge (test_mount.TestAppMerging) ... ok test_mount (test_mount.TestAppMounting) ... ok test_mount_json_bug (test_mount.TestAppMounting) ... ok test_mount_meta (test_mount.TestAppMounting) ... ok test_mount_no_plugins (test_mount.TestAppMounting) ... ok test_mount_order_bug581 (test_mount.TestAppMounting) ... ok test_mount_wsgi (test_mount.TestAppMounting) ... ok test_mount_wsgi_ctype_bug (test_mount.TestAppMounting) ... ok test_no_slash_prefix (test_mount.TestAppMounting) ... ok test_bytearray (test_outputfilter.TestOutputFilter) ... ok test_bytes (test_outputfilter.TestOutputFilter) ... ok test_cookie (test_outputfilter.TestOutputFilter) WSGI: Cookies ... ok test_empty_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_emptylist (test_outputfilter.TestOutputFilter) ... ok test_error (test_outputfilter.TestOutputFilter) ... ok test_error_in_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_fatal_error (test_outputfilter.TestOutputFilter) ... ok test_fatal_error_in_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_file (test_outputfilter.TestOutputFilter) ... ok test_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_httperror_in_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_httpresponse_in_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_illegal (test_outputfilter.TestOutputFilter) ... ok test_invalid_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_iterator_with_close (test_outputfilter.TestOutputFilter) ... ok test_json (test_outputfilter.TestOutputFilter) ... ok test_json_HTTPError (test_outputfilter.TestOutputFilter) ... ok test_json_HTTPResponse (test_outputfilter.TestOutputFilter) ... ok test_json_serialization_error (test_outputfilter.TestOutputFilter) Verify that 500 errors serializing dictionaries don't return ... ok test_none (test_outputfilter.TestOutputFilter) ... ok test_tuple (test_outputfilter.TestOutputFilter) ... ok test_unicode (test_outputfilter.TestOutputFilter) ... ok test_unicode_generator_callback (test_outputfilter.TestOutputFilter) ... ok test_apply (test_plugins.TestPluginAPI) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:533: DeprecationWarning: Switch to Plugin API v2 and access the Route object directly. context = self if api > 1 else self._context ok test_callable (test_plugins.TestPluginAPI) ... ok test_close (test_plugins.TestPluginAPI) ... ok test_instance_method_wrapper (test_plugins.TestPluginAPI) ... ok test_setup (test_plugins.TestPluginAPI) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_plugins.py:198: DeprecationWarning: Please use assertEqual instead. self.assertEquals(getattr(plugin, 'app', None), self.app) ok test_install_decorator (test_plugins.TestPluginManagement) ... ok test_install_non_plugin (test_plugins.TestPluginManagement) ... ok test_install_plugin (test_plugins.TestPluginManagement) ... ok test_plugin_oder (test_plugins.TestPluginManagement) ... ok test_route_plugin (test_plugins.TestPluginManagement) ... ok test_skip_all (test_plugins.TestPluginManagement) ... ok test_skip_by_class (test_plugins.TestPluginManagement) ... ok test_skip_by_instance (test_plugins.TestPluginManagement) ... ok test_skip_by_name (test_plugins.TestPluginManagement) ... ok test_skip_nonlist (test_plugins.TestPluginManagement) ... ok test_uninstall_all (test_plugins.TestPluginManagement) ... ok test_uninstall_by_instance (test_plugins.TestPluginManagement) ... ok test_uninstall_by_name (test_plugins.TestPluginManagement) ... ok test_uninstall_by_type (test_plugins.TestPluginManagement) ... ok test_get (test_resources.TestResourceManager) ... ok test_open (test_resources.TestResourceManager) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_resources.py:76: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_resources.py' mode='r' encoding='UTF-8'> self.assertEqual(fp.read(), open(__file__).read()) ResourceWarning: Enable tracemalloc to get the object allocation traceback /usr/lib64/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_resources.py' mode='r' encoding='UTF-8'> method() ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_path_absolutize (test_resources.TestResourceManager) ... ok test_path_create (test_resources.TestResourceManager) ... ok test_path_normalize (test_resources.TestResourceManager) ... ok test_path_order (test_resources.TestResourceManager) ... ok test_path_unique (test_resources.TestResourceManager) ... ok test_root_path (test_resources.TestResourceManager) ... ok test_callback_inspection (test_route.TestRoute) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:557: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() return getargspec(self.get_undecorated_callback())[0] ok testBasic (test_router.TestRouter) ... ok testBuild (test_router.TestRouter) ... ok testBuildAnon (test_router.TestRouter) ... ok testBuildFilter (test_router.TestRouter) ... ok testErrorInPattern (test_router.TestRouter) ... ok testFloatFilter (test_router.TestRouter) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:386: RuntimeWarning: Route > overwrites a previously defined route warnings.warn(msg % (method, rule), RuntimeWarning) ok testIntFilter (test_router.TestRouter) ... ok testNewSyntax (test_router.TestRouter) ... ok testParentheses (test_router.TestRouter) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:386: RuntimeWarning: Route overwrites a previously defined route warnings.warn(msg % (method, rule), RuntimeWarning) ok testPathFilter (test_router.TestRouter) ... ok testValueErrorInFilter (test_router.TestRouter) ... ok testWildcardNames (test_router.TestRouter) ... ok test_any_static_before_dynamic (test_router.TestRouter) Static ANY routes have higher priority than dynamic ANY routes. ... ok test_dynamic_any_if_method_exists (test_router.TestRouter) Check dynamic ANY routes if the matching method is known, ... ok test_dynamic_before_static_any (test_router.TestRouter) Static ANY routes have lower priority than dynamic GET routes. ... ok test_lots_of_routes (test_router.TestRouter) ... ok testBasic (test_router.TestRouterInCGIMode) ... ok testBuild (test_router.TestRouterInCGIMode) ... ok testBuildAnon (test_router.TestRouterInCGIMode) ... ok testBuildFilter (test_router.TestRouterInCGIMode) ... ok testErrorInPattern (test_router.TestRouterInCGIMode) ... ok testFloatFilter (test_router.TestRouterInCGIMode) ... ok testIntFilter (test_router.TestRouterInCGIMode) ... ok testNewSyntax (test_router.TestRouterInCGIMode) ... ok testParentheses (test_router.TestRouterInCGIMode) ... ok testPathFilter (test_router.TestRouterInCGIMode) ... ok testValueErrorInFilter (test_router.TestRouterInCGIMode) ... ok testWildcardNames (test_router.TestRouterInCGIMode) ... ok test_any_static_before_dynamic (test_router.TestRouterInCGIMode) Static ANY routes have higher priority than dynamic ANY routes. ... ok test_dynamic_any_if_method_exists (test_router.TestRouterInCGIMode) Check dynamic ANY routes if the matching method is known, ... ok test_dynamic_before_static_any (test_router.TestRouterInCGIMode) Static ANY routes have lower priority than dynamic GET routes. ... ok test_lots_of_routes (test_router.TestRouterInCGIMode) ... ok testDeEncode (test_securecookies.TestSecureCookies) ... ok testIsEncoded (test_securecookies.TestSecureCookies) ... ok testValid (test_securecookies.TestSecureCookiesInBottle) ... ok testWrongKey (test_securecookies.TestSecureCookiesInBottle) ... ok test_asctime (test_sendfile.TestDateParser) DateParser: asctime format ... ok test_bad (test_sendfile.TestDateParser) DateParser: Bad format ... ok test_rfc1123 (test_sendfile.TestDateParser) DateParser: RFC 1123 format ... ok test_rfc850 (test_sendfile.TestDateParser) DateParser: RFC 850 format ... ok test_download (test_sendfile.TestSendFile) SendFile: Download as attachment ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py:85: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py'> f = static_file(os.path.basename(__file__), root='./') ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py:86: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py'> self.assertEqual(open(__file__,'rb').read(), f.body.read()) ResourceWarning: Enable tracemalloc to get the object allocation traceback /usr/lib64/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py'> method() ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_ims (test_sendfile.TestSendFile) SendFile: If-Modified-Since ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py:77: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py'> self.assertEqual(open(__file__,'rb').read(), static_file(os.path.basename(__file__), root='./').body.read()) ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_invalid (test_sendfile.TestSendFile) SendFile: Invalid requests ... ok test_mime (test_sendfile.TestSendFile) SendFile: Mime Guessing ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py:62: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py'> f = static_file(os.path.basename(__file__), root='./', mimetype='some/type') ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py:64: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py'> f = static_file(os.path.basename(__file__), root='./', mimetype='text/foo') ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py:66: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py'> f = static_file(os.path.basename(__file__), root='./', mimetype='text/foo', charset='latin1') ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_range (test_sendfile.TestSendFile) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py:93: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py'> self.assertEqual(c.read(16), tob('').join(f.body)) ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py:94: ResourceWarning: unclosed file <_io.BufferedReader name='test_sendfile.py'> self.assertEqual('bytes 10-25/%d' % len(open(basename, 'rb').read()), ResourceWarning: Enable tracemalloc to get the object allocation traceback /usr/lib64/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedReader name='test_sendfile.py'> method() ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_range_parser (test_sendfile.TestSendFile) ... ok test_valid (test_sendfile.TestSendFile) SendFile: Valid requests ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py:43: ResourceWarning: unclosed file <_io.BufferedReader name='/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_sendfile.py'> self.assertEqual(open(__file__,'rb').read(), out.body.read()) ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_simple (test_server.MeinheldServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'meinheld' test (ImportError). ok /usr/lib64/python3.8/unittest/suite.py:84: ResourceWarning: unclosed file <_io.BufferedReader name=3> return self.run(*args, **kwds) ResourceWarning: Enable tracemalloc to get the object allocation traceback /usr/lib64/python3.8/unittest/suite.py:84: ResourceWarning: unclosed file <_io.BufferedReader name=5> return self.run(*args, **kwds) ResourceWarning: Enable tracemalloc to get the object allocation traceback test_simple (test_server.TestBjoernServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'bjoern' test (ImportError). ok test_simple (test_server.TestCherryPyServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'cherrypy' test (ImportError). ok test_simple (test_server.TestDieselServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'diesel' test (ImportError). ok test_simple (test_server.TestEventletServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'eventlet' test (ImportError). ok test_simple (test_server.TestFapwsServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'fapws3' test (ImportError). ok test_simple (test_server.TestGeventServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'gevent' test (ImportError). ok test_simple (test_server.TestGunicornServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'gunicorn' test (ImportError). ok test_simple (test_server.TestPasteServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_simple (test_server.TestRocketServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback WARNING: Skipping 'rocket' test (ImportError). ok test_simple (test_server.TestServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_simple (test_server.TestTornadoServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_simple (test_server.TestTwistedServer) Test a simple static page with this server adapter. ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:47: ResourceWarning: unclosed if ping('127.0.0.1', port): return ResourceWarning: Enable tracemalloc to get the object allocation traceback ok test_defect_coding (test_stpl.TestSTPLDir) ... ok test_multiline_block (test_stpl.TestSTPLDir) ... ok test_multiline_comprehensions_in_code_line (test_stpl.TestSTPLDir) ... ok test_multiline_eob_after_end (test_stpl.TestSTPLDir) ... ok test_multiline_eob_in_single_line_code (test_stpl.TestSTPLDir) ... ok test_multiline_find_eob_in_comments (test_stpl.TestSTPLDir) ... ok test_multiline_ignore_eob_in_string (test_stpl.TestSTPLDir) ... ok test_multiline_indention (test_stpl.TestSTPLDir) ... ok test_multiline_strings_in_code_line (test_stpl.TestSTPLDir) ... ok test_old_include (test_stpl.TestSTPLDir) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:3584: DeprecationWarning: The include and rebase keywords are functions now. line, comment = self.fix_backward_compatibility(line, comment) ok test_old_include_with_args (test_stpl.TestSTPLDir) ... ok test_blocks (test_stpl.TestSimpleTemplate) Templates: Code blocks and loops ... ok test_bug_block_keywords_eat_prefixed_code (test_stpl.TestSimpleTemplate) #595: Everything before an 'if' statement is removed, resulting in ... ok test_bug_no_whitespace_before_stmt (test_stpl.TestSimpleTemplate) ... ok test_coding_stress (test_stpl.TestSimpleTemplate) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:3584: DeprecationWarning: PEP263 encoding strings in templates are deprecated. line, comment = self.fix_backward_compatibility(line, comment) ok test_commentbug (test_stpl.TestSimpleTemplate) A "#" sign within an string is not a comment ... ok test_commentonly (test_stpl.TestSimpleTemplate) Templates: Commentd should behave like code-lines (e.g. flush text-lines) ... ok test_data (test_stpl.TestSimpleTemplate) Templates: Data representation ... ok test_dedentbug (test_stpl.TestSimpleTemplate) One-Line dednet blocks should not change indention ... ok test_defnied (test_stpl.TestSimpleTemplate) ... ok test_detect_pep263 (test_stpl.TestSimpleTemplate) PEP263 strings in code-lines change the template encoding on the fly ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:195: DeprecationWarning: Template encodings other than utf8 are no longer supported. value = obj.__dict__[self.func.__name__] = self.func(obj) ok test_elsebug (test_stpl.TestSimpleTemplate) Whirespace between block keyword and colon is allowed ... ok test_error (test_stpl.TestSimpleTemplate) Templates: Exceptions ... ok test_escape (test_stpl.TestSimpleTemplate) ... ok test_escaped_codelines (test_stpl.TestSimpleTemplate) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:3378: DeprecationWarning: Escape code lines with a backslash. code = parser.translate() ok test_file (test_stpl.TestSimpleTemplate) ... ok test_get (test_stpl.TestSimpleTemplate) ... ok test_global_config (test_stpl.TestSimpleTemplate) ... ok test_htmlutils_quote (test_stpl.TestSimpleTemplate) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_stpl.py:55: DeprecationWarning: Please use assertEqual instead. self.assertEquals('"<' "\\>"', html_quote('<\'\r\n\t"\\>')); ok test_ignore_late_pep263 (test_stpl.TestSimpleTemplate) PEP263 strings must appear within the first two lines ... ok test_ignore_pep263_in_textline (test_stpl.TestSimpleTemplate) PEP263 strings in text-lines have no effect ... ok test_import (test_stpl.TestSimpleTemplate) Templates: import statement ... ok test_include (test_stpl.TestSimpleTemplate) Templates: Include statements ... ok test_multiline (test_stpl.TestSimpleTemplate) Block statements with non-terminating newlines ... ok test_name (test_stpl.TestSimpleTemplate) ... ok test_newline_in_parameterlist (test_stpl.TestSimpleTemplate) Block statements with non-terminating newlines in list ... ok test_nobreak (test_stpl.TestSimpleTemplate) Templates: Nobreak statements ... ok test_noescape (test_stpl.TestSimpleTemplate) ... ok test_noescape_setting (test_stpl.TestSimpleTemplate) ... ok test_nonobreak (test_stpl.TestSimpleTemplate) Templates: Escaped nobreak statements ... ok test_notfound (test_stpl.TestSimpleTemplate) Templates: Unavailable templates ... ok test_onelineblocks (test_stpl.TestSimpleTemplate) Templates: one line code blocks ... ok test_onelinebugs (test_stpl.TestSimpleTemplate) One-Line blocks should not change indention ... ok test_rebase (test_stpl.TestSimpleTemplate) Templates: %rebase and method passing ... ok test_self_as_variable_name (test_stpl.TestSimpleTemplate) ... ok test_setdefault (test_stpl.TestSimpleTemplate) ... ok test_string (test_stpl.TestSimpleTemplate) Templates: Parse string ... ok test_template_shortcut (test_stpl.TestSimpleTemplate) ... ok test_unicode (test_stpl.TestSimpleTemplate) ... ok test_unicode_code (test_stpl.TestSimpleTemplate) Templates: utf8 code in file ... ok test_view_decorator (test_stpl.TestSimpleTemplate) ... ok test_view_decorator_issue_407 (test_stpl.TestSimpleTemplate) ... ok test_winbreaks (test_stpl.TestSimpleTemplate) Templates: Test windows line breaks ... ok test_winbreaks_end_bug (test_stpl.TestSimpleTemplate) ... ok test_module_shortcuts (test_wsgi.TestAppShortcuts) ... ok test_module_shortcuts_with_different_name (test_wsgi.TestAppShortcuts) ... ok test_autoroute (test_wsgi.TestDecorators) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:2648: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() spec = getargspec(func) ok test_routebuild (test_wsgi.TestDecorators) WSGI: Test route builder ... ok test_truncate_body (test_wsgi.TestDecorators) WSGI: Some HTTP status codes must not be used with a response-body ... ok test_view (test_wsgi.TestDecorators) WSGI: Test view-decorator (should override autojson) ... ok test_view_error (test_wsgi.TestDecorators) WSGI: Test if view-decorator reacts on non-dict return values correctly. ... ok test_apply (test_wsgi.TestRouteDecorator) ... ok test_apply_list (test_wsgi.TestRouteDecorator) ... ok test_callback (test_wsgi.TestRouteDecorator) ... ok test_decorators (test_wsgi.TestRouteDecorator) ... ok test_hooks (test_wsgi.TestRouteDecorator) ... ok test_method (test_wsgi.TestRouteDecorator) ... ok test_method_list (test_wsgi.TestRouteDecorator) ... ok test_name (test_wsgi.TestRouteDecorator) ... /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_wsgi.py:259: DeprecationWarning: Please use assertEqual instead. self.assertEquals('/test/6', bottle.url('foo', x=6)) ok test_no_params_at_all (test_wsgi.TestRouteDecorator) ... ok test_no_path (test_wsgi.TestRouteDecorator) ... ok test_path_list (test_wsgi.TestRouteDecorator) ... ok test_single_path (test_wsgi.TestRouteDecorator) ... ok test_template (test_wsgi.TestRouteDecorator) ... ok test_template_opts (test_wsgi.TestRouteDecorator) ... ok test_303 (test_wsgi.TestWsgi) WSGI: redirect (HTTP 303) ... ok test_401 (test_wsgi.TestWsgi) WSGI: abort(401, '') (HTTP 401) ... ok test_500 (test_wsgi.TestWsgi) WSGI: Exceptions within handler code (HTTP 500) ... ok test_500_unicode (test_wsgi.TestWsgi) ... ok test_anymethod (test_wsgi.TestWsgi) ... ok test_cookie (test_wsgi.TestWsgi) WSGI: Cookies ... ok test_generator_callback (test_wsgi.TestWsgi) ... ok test_get (test_wsgi.TestWsgi) WSGI: GET routes ... ok test_headget (test_wsgi.TestWsgi) WSGI: HEAD routes and GET fallback ... ok test_post (test_wsgi.TestWsgi) WSGI: POST routes ... ok test_request_attrs (test_wsgi.TestWsgi) WSGI: POST routes ... ok test_utf8_404 (test_wsgi.TestWsgi) ... ok test_utf8_url (test_wsgi.TestWsgi) WSGI: UTF-8 Characters in the URL ... ok ====================================================================== FAIL: test_delete_cookie (test_environ.TestResponse) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_environ.py", line 627, in test_delete_cookie self.assertTrue('name=;' in cookies[0]) AssertionError: False is not true ---------------------------------------------------------------------- Ran 333 tests in 5.679s FAILED (failures=1) e ``` pytest based test suite fails as well ``` + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/python3 -Bm pytest -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 rootdir: /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19 plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, asyncio-0.14.0, expect-1.1.0, cov-2.11.1, mock-3.5.1, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, flaky-3.7.0, hypothesis-6.9.1 collected 333 items test/test_auth.py . [ 0%] test/test_config.py ..... [ 1%] test/test_configdict.py ....... [ 3%] test/test_contextlocals.py .. [ 4%] test/test_environ.py ..............................................F...................... [ 25%] test/test_fileupload.py ......... [ 27%] test/test_formsdict.py .... [ 29%] test/test_importhook.py ..... [ 30%] test/test_jinja2.py ...FFF.... [ 33%] test/test_mako.py .FFF.... [ 36%] test/test_mdict.py .... [ 37%] test/test_mount.py ......... [ 39%] test/test_outputfilter.py .....FF................. [ 47%] test/test_plugins.py ................... [ 52%] test/test_resources.py ........ [ 55%] test/test_route.py . [ 55%] test/test_router.py ................................ [ 65%] test/test_securecookies.py .... [ 66%] test/test_sendfile.py ....FF.FF.F [ 69%] test/test_server.py ............. [ 73%] test/test_stpl.py ..............F......F.F........F.....F.F............. [ 89%] test/test_wsgi.py ..............................F... [100%] ================================================================================= FAILURES ================================================================================= _____________________________________________________________________ TestResponse.test_delete_cookie ______________________________________________________________________ self = def test_delete_cookie(self): response = BaseResponse() response.set_cookie('name', 'value') response.delete_cookie('name') cookies = [value for name, value in response.headerlist if name.title() == 'Set-Cookie'] > self.assertTrue('name=;' in cookies[0]) E AssertionError: False is not true test/test_environ.py:627: AssertionError _______________________________________________________________________ TestJinja2Template.test_file _______________________________________________________________________ self = def test_file(self): """ Templates: Jinja2 file""" > t = Jinja2Template(name='./views/jinja2_simple.tpl').render(var='var') test/test_jinja2.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/jinja2_simple.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/jinja2_simple.tpl' not found. bottle.py:3232: TemplateError _____________________________________________________________________ TestJinja2Template.test_inherit ______________________________________________________________________ self = def test_inherit(self): """ Templates: Jinja2 lookup and inherience """ > t = Jinja2Template(name='jinja2_inherit', lookup=['./views/']).render() test/test_jinja2.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'jinja2_inherit', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'jinja2_inherit' not found. bottle.py:3232: TemplateError _______________________________________________________________________ TestJinja2Template.test_name _______________________________________________________________________ self = def test_name(self): """ Templates: Jinja2 lookup by name """ > t = Jinja2Template(name='jinja2_simple', lookup=['./views/']).render(var='var') test/test_jinja2.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'jinja2_simple', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'jinja2_simple' not found. bottle.py:3232: TemplateError ________________________________________________________________________ TestMakoTemplate.test_file ________________________________________________________________________ self = def test_file(self): """ Templates: Mako file""" > t = MakoTemplate(name='./views/mako_simple.tpl').render(var='var') test/test_mako.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/mako_simple.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/mako_simple.tpl' not found. bottle.py:3232: TemplateError ______________________________________________________________________ TestMakoTemplate.test_inherit _______________________________________________________________________ self = def test_inherit(self): """ Templates: Mako lookup and inherience """ > t = MakoTemplate(name='mako_inherit', lookup=['./views/']).render(var='v') test/test_mako.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'mako_inherit', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'mako_inherit' not found. bottle.py:3232: TemplateError ________________________________________________________________________ TestMakoTemplate.test_name ________________________________________________________________________ self = def test_name(self): """ Templates: Mako lookup by name """ > t = MakoTemplate(name='mako_simple', lookup=['./views/']).render(var='var') test/test_mako.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'mako_simple', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'mako_simple' not found. bottle.py:3232: TemplateError _______________________________________________________________________ TestOutputFilter.test_error ________________________________________________________________________ self = def test_error(self): self.app.route('/')(lambda: 1/0) self.assertStatus(500) > self.assertInBody('ZeroDivisionError') test/test_outputfilter.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:103: in assertInBody self.fail('The search pattern "%s" is not included in body:\n%s' % (body, result)) E AssertionError: The search pattern "ZeroDivisionError" is not included in body: E b'\n \n \n \n Error: 500 Internal Server Error\n \n \n \n

Error: 500 Internal Server Error

\n

Sorry, the requested URL 'http://127.0.0.1/'\n caused an error:

\n
Internal Server Error
\n \n \n' ____________________________________________________________ TestOutputFilter.test_error_in_generator_callback _____________________________________________________________ self = def test_error_in_generator_callback(self): @self.app.route('/') def test(): yield 1/0 self.assertStatus(500) > self.assertInBody('ZeroDivisionError') test/test_outputfilter.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:103: in assertInBody self.fail('The search pattern "%s" is not included in body:\n%s' % (body, result)) E AssertionError: The search pattern "ZeroDivisionError" is not included in body: E b'\n \n \n \n Error: 500 Internal Server Error\n \n \n \n

Error: 500 Internal Server Error

\n

Sorry, the requested URL 'http://127.0.0.1/'\n caused an error:

\n
Unhandled exception
\n \n \n' ________________________________________________________________________ TestSendFile.test_download ________________________________________________________________________ self = def test_download(self): """ SendFile: Download as attachment """ basename = os.path.basename(__file__) f = static_file(basename, root='./', download=True) > self.assertEqual('attachment; filename="%s"' % basename, f.headers['Content-Disposition']) test/test_sendfile.py:83: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = 'Content-Disposition' > def __getitem__(self, key): return self.dict[_hkey(key)][-1] E KeyError: 'Content-Disposition' bottle.py:1950: KeyError __________________________________________________________________________ TestSendFile.test_ims ___________________________________________________________________________ self = def test_ims(self): """ SendFile: If-Modified-Since""" request.environ['HTTP_IF_MODIFIED_SINCE'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime()) res = static_file(os.path.basename(__file__), root='./') > self.assertEqual(304, res.status_code) E AssertionError: 304 != 404 test/test_sendfile.py:73: AssertionError __________________________________________________________________________ TestSendFile.test_mime __________________________________________________________________________ self = def test_mime(self): """ SendFile: Mime Guessing""" f = static_file(os.path.basename(__file__), root='./') > self.assertTrue(f.headers['Content-Type'].split(';')[0] in ('application/x-python-code', 'text/x-python')) test/test_sendfile.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = 'Content-Type' > def __getitem__(self, key): return self.dict[_hkey(key)][-1] E KeyError: 'Content-Type' bottle.py:1950: KeyError _________________________________________________________________________ TestSendFile.test_range __________________________________________________________________________ self = def test_range(self): basename = os.path.basename(__file__) request.environ['HTTP_RANGE'] = 'bytes=10-25,-80' f = static_file(basename, root='./') > c = open(basename, 'rb'); c.seek(10) E FileNotFoundError: [Errno 2] No such file or directory: 'test_sendfile.py' test/test_sendfile.py:92: FileNotFoundError _________________________________________________________________________ TestSendFile.test_valid __________________________________________________________________________ self = def test_valid(self): """ SendFile: Valid requests""" out = static_file(os.path.basename(__file__), root='./') > self.assertEqual(open(__file__,'rb').read(), out.body.read()) E AttributeError: 'str' object has no attribute 'read' test/test_sendfile.py:43: AttributeError _______________________________________________________________________ TestSimpleTemplate.test_file _______________________________________________________________________ self = def test_file(self): > t = SimpleTemplate(name='./views/stpl_simple.tpl') test/test_stpl.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/stpl_simple.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/stpl_simple.tpl' not found. bottle.py:3232: TemplateError _____________________________________________________________________ TestSimpleTemplate.test_include ______________________________________________________________________ self = def test_include(self): """ Templates: Include statements""" > t = SimpleTemplate(name='stpl_include', lookup=['./views/']) test/test_stpl.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_include', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_include' not found. bottle.py:3232: TemplateError _______________________________________________________________________ TestSimpleTemplate.test_name _______________________________________________________________________ self = def test_name(self): > t = SimpleTemplate(name='stpl_simple', lookup=['./views/']) test/test_stpl.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_simple', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_simple' not found. bottle.py:3232: TemplateError ______________________________________________________________________ TestSimpleTemplate.test_rebase ______________________________________________________________________ self = def test_rebase(self): """ Templates: %rebase and method passing """ > t = SimpleTemplate(name='stpl_t2main', lookup=['./views/']) test/test_stpl.py:156: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_t2main', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_t2main' not found. bottle.py:3232: TemplateError ___________________________________________________________________ TestSimpleTemplate.test_unicode_code ___________________________________________________________________ self = def test_unicode_code(self): """ Templates: utf8 code in file""" > t = SimpleTemplate(name='./views/stpl_unicode.tpl') test/test_stpl.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/stpl_unicode.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/stpl_unicode.tpl' not found. bottle.py:3232: TemplateError _____________________________________________________________ TestSimpleTemplate.test_view_decorator_issue_407 _____________________________________________________________ self = def test_view_decorator_issue_407(self): @view('stpl_no_vars') def test(): pass > self.assertEqual(touni('hihi'), test()) @view('aaa {{x}}', x='bbb') test/test_stpl.py:239: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ bottle.py:3656: in wrapper return template(tpl_name, defaults) bottle.py:3626: in template TEMPLATES[tplid] = adapter(name=tpl, lookup=lookup, **settings) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_no_vars', lookup = ['./', './views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_no_vars' not found. bottle.py:3232: TemplateError _________________________________________________________________________ TestDecorators.test_view _________________________________________________________________________ self = def test_view(self): """ WSGI: Test view-decorator (should override autojson) """ @bottle.route('/tpl') @bottle.view('stpl_t2main') def test(): return dict(content='1234') result = '+base+\n+main+\n!1234!\n+include+\n-main-\n+include+\n-base-\n' self.assertHeader('Content-Type', 'text/html; charset=UTF-8', '/tpl') > self.assertBody(result, '/tpl') test/test_wsgi.py:282: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:98: in assertBody self.assertEqual(tob(body), self.urlopen(route, **kargs)['body']) E AssertionError: b'+base+\n+main+\n!1234!\n+include+\n-main-[17 chars]e-\n' != b'\n \n' ============================================================================= warnings summary ============================================================================= test/test_server.py:53 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:53: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 128: # Import error test/test_server.py:57 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 3: # Port in use test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:39: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.foo'], 5) test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:40: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.bar'], 6) test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:41: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.baz'], 7) test/test_config.py::TestConfDict::test_meta /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:32: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['int'], 6) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:30: DeprecationWarning: Attribute assignment is deprecated. c.test = 5 test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:31: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.test) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:34: DeprecationWarning: Attribute access is deprecated. self.assertEqual(6, c.test) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:38: DeprecationWarning: Attribute access is deprecated. self.assertEqual(None, c.test) test/test_configdict.py::TestConfigDict::test_call /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:61: DeprecationWarning: Calling ConfDict is deprecated. Use the update() method. self.assertEqual(c, c(a=1)) test/test_configdict.py::TestConfigDict::test_call /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:63: DeprecationWarning: Attribute access is deprecated. self.assertEqual(1, c.a) test/test_configdict.py::TestConfigDict::test_isadict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:12: DeprecationWarning: Constructor does no longer accept parameters. d, m = dict(a=5), ConfigDict(a=5) test/test_configdict.py::TestConfigDict::test_issue588 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:70: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] self.assertEqual('c', c['a']['b']) test/test_configdict.py::TestConfigDict::test_issue588 /usr/lib64/python3.8/_collections_abc.py:744: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] yield (key, self._mapping[key]) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:43: DeprecationWarning: Attribute access is deprecated. self.assertEqual(ConfigDict.Namespace, c.Name.Space.__class__) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /usr/lib64/python3.8/_collections_abc.py:660: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] return self[key] test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:44: DeprecationWarning: Attribute access is deprecated. c.Name.Space.value = 5 test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:44: DeprecationWarning: Attribute assignment is deprecated. c.Name.Space.value = 5 test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:45: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name.Space.value) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:46: DeprecationWarning: Attribute access is deprecated. self.assertTrue('value' in c.Name.Space) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:47: DeprecationWarning: Attribute access is deprecated. self.assertTrue('Space' in c.Name) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:51: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'Name', 5)) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:53: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'keys', 5)) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:56: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name) test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked_meta_fields test/test_environ.py::TestRequest::test_chunked_meta_fields test/test_environ.py::TestRequest::test_chunked_meta_fields /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_environ.py:302: DeprecationWarning: Please use assertEqual instead. self.assertEquals(tob(expect), BaseRequest(e).body.read()) test/test_environ.py::TestResponse::test_content_type /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_environ.py:581: DeprecationWarning: Please use assertEqual instead. self.assertEquals('test/some', rs.headers.get('Content-Type')) test/test_jinja2.py::TestJinja2Template::test_file test/test_jinja2.py::TestJinja2Template::test_notfound test/test_mako.py::TestMakoTemplate::test_file test/test_mako.py::TestMakoTemplate::test_notfound test/test_stpl.py::TestSimpleTemplate::test_file test/test_stpl.py::TestSimpleTemplate::test_notfound test/test_stpl.py::TestSimpleTemplate::test_unicode_code /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:3230: DeprecationWarning: The template lookup path list should not be empty. self.filename = self.search(self.name, self.lookup) test/test_plugins.py: 15 warnings /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:533: DeprecationWarning: Switch to Plugin API v2 and access the Route object directly. context = self if api > 1 else self._context test/test_plugins.py::TestPluginAPI::test_setup /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_plugins.py:198: DeprecationWarning: Please use assertEqual instead. self.assertEquals(getattr(plugin, 'app', None), self.app) test/test_route.py::TestRoute::test_callback_inspection test/test_route.py::TestRoute::test_callback_inspection /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:557: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() return getargspec(self.get_undecorated_callback())[0] test/test_stpl.py::TestSimpleTemplate::test_coding_stress test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:3584: DeprecationWarning: PEP263 encoding strings in templates are deprecated. line, comment = self.fix_backward_compatibility(line, comment) test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:195: DeprecationWarning: Template encodings other than utf8 are no longer supported. value = obj.__dict__[self.func.__name__] = self.func(obj) test/test_stpl.py::TestSimpleTemplate::test_escaped_codelines test/test_stpl.py::TestSimpleTemplate::test_escaped_codelines /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:3378: DeprecationWarning: Escape code lines with a backslash. code = parser.translate() test/test_stpl.py::TestSimpleTemplate::test_htmlutils_quote /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_stpl.py:55: DeprecationWarning: Please use assertEqual instead. self.assertEquals('"<' "\\>"', html_quote('<\'\r\n\t"\\>')); test/test_stpl.py::TestSTPLDir::test_old_include test/test_stpl.py::TestSTPLDir::test_old_include_with_args /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:3584: DeprecationWarning: The include and rebase keywords are functions now. line, comment = self.fix_backward_compatibility(line, comment) test/test_wsgi.py: 14 warnings /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/bottle.py:2648: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() spec = getargspec(func) test/test_wsgi.py::TestRouteDecorator::test_name /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_wsgi.py:259: DeprecationWarning: Please use assertEqual instead. self.assertEquals('/test/6', bottle.url('foo', x=6)) -- Docs: https://docs.pytest.org/en/stable/warnings.html ========================================================================= short test summary info ========================================================================== FAILED test/test_environ.py::TestResponse::test_delete_cookie - AssertionError: False is not true FAILED test/test_jinja2.py::TestJinja2Template::test_file - bottle.TemplateError: Template './views/jinja2_simple.tpl' not found. FAILED test/test_jinja2.py::TestJinja2Template::test_inherit - bottle.TemplateError: Template 'jinja2_inherit' not found. FAILED test/test_jinja2.py::TestJinja2Template::test_name - bottle.TemplateError: Template 'jinja2_simple' not found. FAILED test/test_mako.py::TestMakoTemplate::test_file - bottle.TemplateError: Template './views/mako_simple.tpl' not found. FAILED test/test_mako.py::TestMakoTemplate::test_inherit - bottle.TemplateError: Template 'mako_inherit' not found. FAILED test/test_mako.py::TestMakoTemplate::test_name - bottle.TemplateError: Template 'mako_simple' not found. FAILED test/test_outputfilter.py::TestOutputFilter::test_error - AssertionError: The search pattern "ZeroDivisionError" is not included in body: FAILED test/test_outputfilter.py::TestOutputFilter::test_error_in_generator_callback - AssertionError: The search pattern "ZeroDivisionError" is not included in body: FAILED test/test_sendfile.py::TestSendFile::test_download - KeyError: 'Content-Disposition' FAILED test/test_sendfile.py::TestSendFile::test_ims - AssertionError: 304 != 404 FAILED test/test_sendfile.py::TestSendFile::test_mime - KeyError: 'Content-Type' FAILED test/test_sendfile.py::TestSendFile::test_range - FileNotFoundError: [Errno 2] No such file or directory: 'test_sendfile.py' FAILED test/test_sendfile.py::TestSendFile::test_valid - AttributeError: 'str' object has no attribute 'read' FAILED test/test_stpl.py::TestSimpleTemplate::test_file - bottle.TemplateError: Template './views/stpl_simple.tpl' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_include - bottle.TemplateError: Template 'stpl_include' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_name - bottle.TemplateError: Template 'stpl_simple' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_rebase - bottle.TemplateError: Template 'stpl_t2main' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_unicode_code - bottle.TemplateError: Template './views/stpl_unicode.tpl' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_view_decorator_issue_407 - bottle.TemplateError: Template 'stpl_no_vars' not found. FAILED test/test_wsgi.py::TestDecorators::test_view - AssertionError: b'+base+\n+main+\n!1234!\n+include+\n-main-[17 chars]e-\n' != b'\n
kloczek commented 3 years ago

Looks like pytest is failing as well

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000) Using --randomly-seed=3368613231 rootdir: /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19 plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, aspectlib-1.5.2, toolbox-0.5, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, flaky-3.7.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, xprocess-0.18.1, black-0.3.12, anyio-3.3.0, asyncio-0.15.1, trio-0.7.0, subtests-0.5.0, isort-2.0.0, hypothesis-6.14.6, mock-3.6.1, profiling-1.7.0, randomly-3.8.0, Faker-8.12.1, nose2pytest-1.0.8, pyfakefs-4.5.1, tornado-0.8.1, twisted-1.13.3 collected 333 items test/test_stpl.py .....................F......F...F.F.....F.F........... [ 16%] test/test_router.py ................................ [ 25%] test/test_configdict.py ....... [ 27%] test/test_jinja2.py ...F..FF.. [ 30%] test/test_formsdict.py .... [ 32%] test/test_fileupload.py ......... [ 34%] test/test_sendfile.py .....FFFFF. [ 38%] test/test_wsgi.py ..F............................... [ 48%] test/test_config.py ..... [ 49%] test/test_mdict.py .... [ 51%] test/test_importhook.py ..... [ 52%] test/test_environ.py .................................................................F... [ 73%] test/test_mount.py ......... [ 75%] test/test_contextlocals.py .. [ 76%] test/test_outputfilter.py ..F............F........ [ 83%] test/test_route.py . [ 84%] test/test_server.py ............. [ 87%] test/test_mako.py .F.F...F [ 90%] test/test_securecookies.py .... [ 91%] test/test_resources.py ........ [ 93%] test/test_auth.py . [ 94%] test/test_plugins.py ................... [100%] ================================================================================= FAILURES ================================================================================= ___________________________________________________________________ TestSimpleTemplate.test_unicode_code ___________________________________________________________________ self = def test_unicode_code(self): """ Templates: utf8 code in file""" > t = SimpleTemplate(name='./views/stpl_unicode.tpl') test/test_stpl.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/stpl_unicode.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/stpl_unicode.tpl' not found. ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError ______________________________________________________________________ TestSimpleTemplate.test_rebase ______________________________________________________________________ self = def test_rebase(self): """ Templates: %rebase and method passing """ > t = SimpleTemplate(name='stpl_t2main', lookup=['./views/']) test/test_stpl.py:156: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_t2main', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_t2main' not found. ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _____________________________________________________________ TestSimpleTemplate.test_view_decorator_issue_407 _____________________________________________________________ self = def test_view_decorator_issue_407(self): @view('stpl_no_vars') def test(): pass > self.assertEqual(touni('hihi'), test()) @view('aaa {{x}}', x='bbb') test/test_stpl.py:239: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3656: in wrapper return template(tpl_name, defaults) ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3626: in template TEMPLATES[tplid] = adapter(name=tpl, lookup=lookup, **settings) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_no_vars', lookup = ['./', './views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_no_vars' not found. ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _______________________________________________________________________ TestSimpleTemplate.test_name _______________________________________________________________________ self = def test_name(self): > t = SimpleTemplate(name='stpl_simple', lookup=['./views/']) test/test_stpl.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_simple', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_simple' not found. ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _______________________________________________________________________ TestSimpleTemplate.test_file _______________________________________________________________________ self = def test_file(self): > t = SimpleTemplate(name='./views/stpl_simple.tpl') test/test_stpl.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/stpl_simple.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/stpl_simple.tpl' not found. ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _____________________________________________________________________ TestSimpleTemplate.test_include ______________________________________________________________________ self = def test_include(self): """ Templates: Include statements""" > t = SimpleTemplate(name='stpl_include', lookup=['./views/']) test/test_stpl.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_include', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_include' not found. ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _______________________________________________________________________ TestJinja2Template.test_name _______________________________________________________________________ self = def test_name(self): """ Templates: Jinja2 lookup by name """ > t = Jinja2Template(name='jinja2_simple', lookup=['./views/']).render(var='var') test/test_jinja2.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'jinja2_simple', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'jinja2_simple' not found. ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _____________________________________________________________________ TestJinja2Template.test_inherit ______________________________________________________________________ self = def test_inherit(self): """ Templates: Jinja2 lookup and inherience """ > t = Jinja2Template(name='jinja2_inherit', lookup=['./views/']).render() test/test_jinja2.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'jinja2_inherit', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'jinja2_inherit' not found. ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _______________________________________________________________________ TestJinja2Template.test_file _______________________________________________________________________ self = def test_file(self): """ Templates: Jinja2 file""" > t = Jinja2Template(name='./views/jinja2_simple.tpl').render(var='var') test/test_jinja2.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/jinja2_simple.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/jinja2_simple.tpl' not found. ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _________________________________________________________________________ TestSendFile.test_valid __________________________________________________________________________ self = def test_valid(self): """ SendFile: Valid requests""" out = static_file(os.path.basename(__file__), root='./') > self.assertEqual(open(__file__,'rb').read(), out.body.read()) E AttributeError: 'str' object has no attribute 'read' test/test_sendfile.py:43: AttributeError _________________________________________________________________________ TestSendFile.test_range __________________________________________________________________________ self = def test_range(self): basename = os.path.basename(__file__) request.environ['HTTP_RANGE'] = 'bytes=10-25,-80' f = static_file(basename, root='./') > c = open(basename, 'rb'); c.seek(10) E FileNotFoundError: [Errno 2] No such file or directory: 'test_sendfile.py' test/test_sendfile.py:92: FileNotFoundError ________________________________________________________________________ TestSendFile.test_download ________________________________________________________________________ self = def test_download(self): """ SendFile: Download as attachment """ basename = os.path.basename(__file__) f = static_file(basename, root='./', download=True) > self.assertEqual('attachment; filename="%s"' % basename, f.headers['Content-Disposition']) test/test_sendfile.py:83: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = 'Content-Disposition' > def __getitem__(self, key): return self.dict[_hkey(key)][-1] E KeyError: 'Content-Disposition' ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:1950: KeyError __________________________________________________________________________ TestSendFile.test_ims ___________________________________________________________________________ self = def test_ims(self): """ SendFile: If-Modified-Since""" request.environ['HTTP_IF_MODIFIED_SINCE'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime()) res = static_file(os.path.basename(__file__), root='./') > self.assertEqual(304, res.status_code) E AssertionError: 304 != 404 test/test_sendfile.py:73: AssertionError __________________________________________________________________________ TestSendFile.test_mime __________________________________________________________________________ self = def test_mime(self): """ SendFile: Mime Guessing""" f = static_file(os.path.basename(__file__), root='./') > self.assertTrue(f.headers['Content-Type'].split(';')[0] in ('application/x-python-code', 'text/x-python')) test/test_sendfile.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = 'Content-Type' > def __getitem__(self, key): return self.dict[_hkey(key)][-1] E KeyError: 'Content-Type' ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:1950: KeyError _________________________________________________________________________ TestDecorators.test_view _________________________________________________________________________ self = def test_view(self): """ WSGI: Test view-decorator (should override autojson) """ @bottle.route('/tpl') @bottle.view('stpl_t2main') def test(): return dict(content='1234') result = '+base+\n+main+\n!1234!\n+include+\n-main-\n+include+\n-base-\n' self.assertHeader('Content-Type', 'text/html; charset=UTF-8', '/tpl') > self.assertBody(result, '/tpl') test/test_wsgi.py:282: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:98: in assertBody self.assertEqual(tob(body), self.urlopen(route, **kargs)['body']) E AssertionError: b'+base+\n+main+\n!1234!\n+include+\n-main-[17 chars]e-\n' != b'\n \n' _____________________________________________________________________ TestResponse.test_delete_cookie ______________________________________________________________________ self = def test_delete_cookie(self): response = BaseResponse() response.set_cookie('name', 'value') response.delete_cookie('name') cookies = [value for name, value in response.headerlist if name.title() == 'Set-Cookie'] > self.assertTrue('name=;' in cookies[0]) E AssertionError: False is not true test/test_environ.py:627: AssertionError ____________________________________________________________ TestOutputFilter.test_error_in_generator_callback _____________________________________________________________ self = def test_error_in_generator_callback(self): @self.app.route('/') def test(): yield 1/0 self.assertStatus(500) > self.assertInBody('ZeroDivisionError') test/test_outputfilter.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:103: in assertInBody self.fail('The search pattern "%s" is not included in body:\n%s' % (body, result)) E AssertionError: The search pattern "ZeroDivisionError" is not included in body: E b'\n \n \n \n Error: 500 Internal Server Error\n \n \n \n

Error: 500 Internal Server Error

\n

Sorry, the requested URL 'http://127.0.0.1/'\n caused an error:

\n
Unhandled exception
\n \n \n' _______________________________________________________________________ TestOutputFilter.test_error ________________________________________________________________________ self = def test_error(self): self.app.route('/')(lambda: 1/0) self.assertStatus(500) > self.assertInBody('ZeroDivisionError') test/test_outputfilter.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:103: in assertInBody self.fail('The search pattern "%s" is not included in body:\n%s' % (body, result)) E AssertionError: The search pattern "ZeroDivisionError" is not included in body: E b'\n \n \n \n Error: 500 Internal Server Error\n \n \n \n

Error: 500 Internal Server Error

\n

Sorry, the requested URL 'http://127.0.0.1/'\n caused an error:

\n
Internal Server Error
\n \n \n' ________________________________________________________________________ TestMakoTemplate.test_file ________________________________________________________________________ self = def test_file(self): """ Templates: Mako file""" > t = MakoTemplate(name='./views/mako_simple.tpl').render(var='var') test/test_mako.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/mako_simple.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/mako_simple.tpl' not found. ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError ______________________________________________________________________ TestMakoTemplate.test_inherit _______________________________________________________________________ self = def test_inherit(self): """ Templates: Mako lookup and inherience """ > t = MakoTemplate(name='mako_inherit', lookup=['./views/']).render(var='v') test/test_mako.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'mako_inherit', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'mako_inherit' not found. ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError ________________________________________________________________________ TestMakoTemplate.test_name ________________________________________________________________________ self = def test_name(self): """ Templates: Mako lookup by name """ > t = MakoTemplate(name='mako_simple', lookup=['./views/']).render(var='var') test/test_mako.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'mako_simple', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'mako_simple' not found. ../../BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError ============================================================================= warnings summary ============================================================================= test/test_server.py:53 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:53: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 128: # Import error test/test_server.py:57 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 3: # Port in use test/test_stpl.py::TestSTPLDir::test_old_include test/test_stpl.py::TestSTPLDir::test_old_include_with_args /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3584: DeprecationWarning: The include and rebase keywords are functions now. line, comment = self.fix_backward_compatibility(line, comment) test/test_stpl.py::TestSimpleTemplate::test_htmlutils_quote /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_stpl.py:55: DeprecationWarning: Please use assertEqual instead. self.assertEquals('"<' "\\>"', html_quote('<\'\r\n\t"\\>')); test/test_stpl.py::TestSimpleTemplate::test_escaped_codelines test/test_stpl.py::TestSimpleTemplate::test_escaped_codelines /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3378: DeprecationWarning: Escape code lines with a backslash. code = parser.translate() test/test_stpl.py::TestSimpleTemplate::test_unicode_code test/test_stpl.py::TestSimpleTemplate::test_notfound test/test_stpl.py::TestSimpleTemplate::test_file test/test_jinja2.py::TestJinja2Template::test_notfound test/test_jinja2.py::TestJinja2Template::test_file test/test_mako.py::TestMakoTemplate::test_file test/test_mako.py::TestMakoTemplate::test_notfound /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3230: DeprecationWarning: The template lookup path list should not be empty. self.filename = self.search(self.name, self.lookup) test/test_stpl.py::TestSimpleTemplate::test_coding_stress test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3584: DeprecationWarning: PEP263 encoding strings in templates are deprecated. line, comment = self.fix_backward_compatibility(line, comment) test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:195: DeprecationWarning: Template encodings other than utf8 are no longer supported. value = obj.__dict__[self.func.__name__] = self.func(obj) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:30: DeprecationWarning: Attribute assignment is deprecated. c.test = 5 test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:31: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.test) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:34: DeprecationWarning: Attribute access is deprecated. self.assertEqual(6, c.test) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:38: DeprecationWarning: Attribute access is deprecated. self.assertEqual(None, c.test) test/test_configdict.py::TestConfigDict::test_isadict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:12: DeprecationWarning: Constructor does no longer accept parameters. d, m = dict(a=5), ConfigDict(a=5) test/test_configdict.py::TestConfigDict::test_issue588 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:70: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] self.assertEqual('c', c['a']['b']) test/test_configdict.py::TestConfigDict::test_issue588 /usr/lib64/python3.8/_collections_abc.py:744: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] yield (key, self._mapping[key]) test/test_configdict.py::TestConfigDict::test_call /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:61: DeprecationWarning: Calling ConfDict is deprecated. Use the update() method. self.assertEqual(c, c(a=1)) test/test_configdict.py::TestConfigDict::test_call /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:63: DeprecationWarning: Attribute access is deprecated. self.assertEqual(1, c.a) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:43: DeprecationWarning: Attribute access is deprecated. self.assertEqual(ConfigDict.Namespace, c.Name.Space.__class__) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /usr/lib64/python3.8/_collections_abc.py:660: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] return self[key] test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:44: DeprecationWarning: Attribute access is deprecated. c.Name.Space.value = 5 test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:44: DeprecationWarning: Attribute assignment is deprecated. c.Name.Space.value = 5 test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:45: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name.Space.value) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:46: DeprecationWarning: Attribute access is deprecated. self.assertTrue('value' in c.Name.Space) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:47: DeprecationWarning: Attribute access is deprecated. self.assertTrue('Space' in c.Name) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:51: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'Name', 5)) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:53: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'keys', 5)) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:56: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name) test/test_wsgi.py: 14 warnings /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:2648: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() spec = getargspec(func) test/test_wsgi.py::TestRouteDecorator::test_name /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_wsgi.py:259: DeprecationWarning: Please use assertEqual instead. self.assertEquals('/test/6', bottle.url('foo', x=6)) test/test_config.py::TestConfDict::test_meta /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:32: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['int'], 6) test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:39: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.foo'], 5) test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:40: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.bar'], 6) test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:41: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.baz'], 7) test/test_environ.py::TestRequest::test_chunked_meta_fields test/test_environ.py::TestRequest::test_chunked_meta_fields test/test_environ.py::TestRequest::test_chunked_meta_fields test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_environ.py:302: DeprecationWarning: Please use assertEqual instead. self.assertEquals(tob(expect), BaseRequest(e).body.read()) test/test_environ.py::TestResponse::test_content_type /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_environ.py:581: DeprecationWarning: Please use assertEqual instead. self.assertEquals('test/some', rs.headers.get('Content-Type')) test/test_route.py::TestRoute::test_callback_inspection test/test_route.py::TestRoute::test_callback_inspection /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:557: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() return getargspec(self.get_undecorated_callback())[0] test/test_plugins.py::TestPluginAPI::test_setup /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_plugins.py:198: DeprecationWarning: Please use assertEqual instead. self.assertEquals(getattr(plugin, 'app', None), self.app) test/test_plugins.py: 15 warnings /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.1.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:533: DeprecationWarning: Switch to Plugin API v2 and access the Route object directly. context = self if api > 1 else self._context -- Docs: https://docs.pytest.org/en/stable/warnings.html ========================================================================= short test summary info ========================================================================== FAILED test/test_stpl.py::TestSimpleTemplate::test_unicode_code - bottle.TemplateError: Template './views/stpl_unicode.tpl' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_rebase - bottle.TemplateError: Template 'stpl_t2main' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_view_decorator_issue_407 - bottle.TemplateError: Template 'stpl_no_vars' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_name - bottle.TemplateError: Template 'stpl_simple' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_file - bottle.TemplateError: Template './views/stpl_simple.tpl' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_include - bottle.TemplateError: Template 'stpl_include' not found. FAILED test/test_jinja2.py::TestJinja2Template::test_name - bottle.TemplateError: Template 'jinja2_simple' not found. FAILED test/test_jinja2.py::TestJinja2Template::test_inherit - bottle.TemplateError: Template 'jinja2_inherit' not found. FAILED test/test_jinja2.py::TestJinja2Template::test_file - bottle.TemplateError: Template './views/jinja2_simple.tpl' not found. FAILED test/test_sendfile.py::TestSendFile::test_valid - AttributeError: 'str' object has no attribute 'read' FAILED test/test_sendfile.py::TestSendFile::test_range - FileNotFoundError: [Errno 2] No such file or directory: 'test_sendfile.py' FAILED test/test_sendfile.py::TestSendFile::test_download - KeyError: 'Content-Disposition' FAILED test/test_sendfile.py::TestSendFile::test_ims - AssertionError: 304 != 404 FAILED test/test_sendfile.py::TestSendFile::test_mime - KeyError: 'Content-Type' FAILED test/test_wsgi.py::TestDecorators::test_view - AssertionError: b'+base+\n+main+\n!1234!\n+include+\n-main-[17 chars]e-\n' != b'\n ).terminate()'. ```
kloczek commented 2 years ago

Just tested -0.12.19 and pytest still fails

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19 collected 325 items test/test_auth.py . [ 0%] test/test_config.py ..... [ 1%] test/test_configdict.py ....... [ 4%] test/test_contextlocals.py .. [ 4%] test/test_environ.py ..............................................F...................... [ 25%] test/test_fileupload.py ......... [ 28%] test/test_formsdict.py .... [ 29%] test/test_importhook.py ..... [ 31%] test/test_jinja2.py ...FFF.... [ 34%] test/test_mdict.py .... [ 35%] test/test_mount.py ......... [ 38%] test/test_outputfilter.py .....FF................. [ 45%] test/test_plugins.py ................... [ 51%] test/test_resources.py ........ [ 54%] test/test_route.py . [ 54%] test/test_router.py ................................ [ 64%] test/test_securecookies.py .... [ 65%] test/test_sendfile.py ....FF.FF.F [ 68%] test/test_server.py ............. [ 72%] test/test_stpl.py ..............F......F.F........F.....F.F............. [ 89%] test/test_wsgi.py ..............................F... [100%] ================================================================================= FAILURES ================================================================================= _____________________________________________________________________ TestResponse.test_delete_cookie ______________________________________________________________________ self = def test_delete_cookie(self): response = BaseResponse() response.set_cookie('name', 'value') response.delete_cookie('name') cookies = [value for name, value in response.headerlist if name.title() == 'Set-Cookie'] > self.assertTrue('name=;' in cookies[0]) E AssertionError: False is not true test/test_environ.py:627: AssertionError _______________________________________________________________________ TestJinja2Template.test_file _______________________________________________________________________ self = def test_file(self): """ Templates: Jinja2 file""" > t = Jinja2Template(name='./views/jinja2_simple.tpl').render(var='var') test/test_jinja2.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/jinja2_simple.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/jinja2_simple.tpl' not found. ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _____________________________________________________________________ TestJinja2Template.test_inherit ______________________________________________________________________ self = def test_inherit(self): """ Templates: Jinja2 lookup and inherience """ > t = Jinja2Template(name='jinja2_inherit', lookup=['./views/']).render() test/test_jinja2.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'jinja2_inherit', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'jinja2_inherit' not found. ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _______________________________________________________________________ TestJinja2Template.test_name _______________________________________________________________________ self = def test_name(self): """ Templates: Jinja2 lookup by name """ > t = Jinja2Template(name='jinja2_simple', lookup=['./views/']).render(var='var') test/test_jinja2.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'jinja2_simple', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'jinja2_simple' not found. ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _______________________________________________________________________ TestOutputFilter.test_error ________________________________________________________________________ self = def test_error(self): self.app.route('/')(lambda: 1/0) self.assertStatus(500) > self.assertInBody('ZeroDivisionError') test/test_outputfilter.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:103: in assertInBody self.fail('The search pattern "%s" is not included in body:\n%s' % (body, result)) E AssertionError: The search pattern "ZeroDivisionError" is not included in body: E b'\n \n \n \n Error: 500 Internal Server Error\n \n \n \n

Error: 500 Internal Server Error

\n

Sorry, the requested URL 'http://127.0.0.1/'\n caused an error:

\n
Internal Server Error
\n \n \n' ____________________________________________________________ TestOutputFilter.test_error_in_generator_callback _____________________________________________________________ self = def test_error_in_generator_callback(self): @self.app.route('/') def test(): yield 1/0 self.assertStatus(500) > self.assertInBody('ZeroDivisionError') test/test_outputfilter.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:103: in assertInBody self.fail('The search pattern "%s" is not included in body:\n%s' % (body, result)) E AssertionError: The search pattern "ZeroDivisionError" is not included in body: E b'\n \n \n \n Error: 500 Internal Server Error\n \n \n \n

Error: 500 Internal Server Error

\n

Sorry, the requested URL 'http://127.0.0.1/'\n caused an error:

\n
Unhandled exception
\n \n \n' ________________________________________________________________________ TestSendFile.test_download ________________________________________________________________________ self = def test_download(self): """ SendFile: Download as attachment """ basename = os.path.basename(__file__) f = static_file(basename, root='./', download=True) > self.assertEqual('attachment; filename="%s"' % basename, f.headers['Content-Disposition']) test/test_sendfile.py:83: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = 'Content-Disposition' > def __getitem__(self, key): return self.dict[_hkey(key)][-1] E KeyError: 'Content-Disposition' ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:1950: KeyError __________________________________________________________________________ TestSendFile.test_ims ___________________________________________________________________________ self = def test_ims(self): """ SendFile: If-Modified-Since""" request.environ['HTTP_IF_MODIFIED_SINCE'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime()) res = static_file(os.path.basename(__file__), root='./') > self.assertEqual(304, res.status_code) E AssertionError: 304 != 404 test/test_sendfile.py:73: AssertionError __________________________________________________________________________ TestSendFile.test_mime __________________________________________________________________________ self = def test_mime(self): """ SendFile: Mime Guessing""" f = static_file(os.path.basename(__file__), root='./') > self.assertTrue(f.headers['Content-Type'].split(';')[0] in ('application/x-python-code', 'text/x-python')) test/test_sendfile.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = 'Content-Type' > def __getitem__(self, key): return self.dict[_hkey(key)][-1] E KeyError: 'Content-Type' ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:1950: KeyError _________________________________________________________________________ TestSendFile.test_range __________________________________________________________________________ self = def test_range(self): basename = os.path.basename(__file__) request.environ['HTTP_RANGE'] = 'bytes=10-25,-80' f = static_file(basename, root='./') > c = open(basename, 'rb'); c.seek(10) E FileNotFoundError: [Errno 2] No such file or directory: 'test_sendfile.py' test/test_sendfile.py:92: FileNotFoundError _________________________________________________________________________ TestSendFile.test_valid __________________________________________________________________________ self = def test_valid(self): """ SendFile: Valid requests""" out = static_file(os.path.basename(__file__), root='./') > self.assertEqual(open(__file__,'rb').read(), out.body.read()) E AttributeError: 'str' object has no attribute 'read' test/test_sendfile.py:43: AttributeError _______________________________________________________________________ TestSimpleTemplate.test_file _______________________________________________________________________ self = def test_file(self): > t = SimpleTemplate(name='./views/stpl_simple.tpl') test/test_stpl.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/stpl_simple.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/stpl_simple.tpl' not found. ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _____________________________________________________________________ TestSimpleTemplate.test_include ______________________________________________________________________ self = def test_include(self): """ Templates: Include statements""" > t = SimpleTemplate(name='stpl_include', lookup=['./views/']) test/test_stpl.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_include', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_include' not found. ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _______________________________________________________________________ TestSimpleTemplate.test_name _______________________________________________________________________ self = def test_name(self): > t = SimpleTemplate(name='stpl_simple', lookup=['./views/']) test/test_stpl.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_simple', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_simple' not found. ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError ______________________________________________________________________ TestSimpleTemplate.test_rebase ______________________________________________________________________ self = def test_rebase(self): """ Templates: %rebase and method passing """ > t = SimpleTemplate(name='stpl_t2main', lookup=['./views/']) test/test_stpl.py:156: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_t2main', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_t2main' not found. ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError ___________________________________________________________________ TestSimpleTemplate.test_unicode_code ___________________________________________________________________ self = def test_unicode_code(self): """ Templates: utf8 code in file""" > t = SimpleTemplate(name='./views/stpl_unicode.tpl') test/test_stpl.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/stpl_unicode.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/stpl_unicode.tpl' not found. ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _____________________________________________________________ TestSimpleTemplate.test_view_decorator_issue_407 _____________________________________________________________ self = def test_view_decorator_issue_407(self): @view('stpl_no_vars') def test(): pass > self.assertEqual(touni('hihi'), test()) @view('aaa {{x}}', x='bbb') test/test_stpl.py:239: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3656: in wrapper return template(tpl_name, defaults) ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3626: in template TEMPLATES[tplid] = adapter(name=tpl, lookup=lookup, **settings) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_no_vars', lookup = ['./', './views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_no_vars' not found. ../../BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3232: TemplateError _________________________________________________________________________ TestDecorators.test_view _________________________________________________________________________ self = def test_view(self): """ WSGI: Test view-decorator (should override autojson) """ @bottle.route('/tpl') @bottle.view('stpl_t2main') def test(): return dict(content='1234') result = '+base+\n+main+\n!1234!\n+include+\n-main-\n+include+\n-base-\n' self.assertHeader('Content-Type', 'text/html; charset=UTF-8', '/tpl') > self.assertBody(result, '/tpl') test/test_wsgi.py:282: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:98: in assertBody self.assertEqual(tob(body), self.urlopen(route, **kargs)['body']) E AssertionError: b'+base+\n+main+\n!1234!\n+include+\n-main-[17 chars]e-\n' != b'\n \n' ============================================================================= warnings summary ============================================================================= test/test_importhook.py:4 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_importhook.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp test/test_server.py:53 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:53: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 128: # Import error test/test_server.py:57 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_server.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 3: # Port in use test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:39: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.foo'], 5) test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:40: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.bar'], 6) test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:41: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.baz'], 7) test/test_config.py::TestConfDict::test_meta /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_config.py:32: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['int'], 6) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:30: DeprecationWarning: Attribute assignment is deprecated. c.test = 5 test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:31: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.test) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:34: DeprecationWarning: Attribute access is deprecated. self.assertEqual(6, c.test) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:38: DeprecationWarning: Attribute access is deprecated. self.assertEqual(None, c.test) test/test_configdict.py::TestConfigDict::test_call /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:61: DeprecationWarning: Calling ConfDict is deprecated. Use the update() method. self.assertEqual(c, c(a=1)) test/test_configdict.py::TestConfigDict::test_call /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:63: DeprecationWarning: Attribute access is deprecated. self.assertEqual(1, c.a) test/test_configdict.py::TestConfigDict::test_isadict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:12: DeprecationWarning: Constructor does no longer accept parameters. d, m = dict(a=5), ConfigDict(a=5) test/test_configdict.py::TestConfigDict::test_issue588 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:70: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] self.assertEqual('c', c['a']['b']) test/test_configdict.py::TestConfigDict::test_issue588 /usr/lib64/python3.8/_collections_abc.py:744: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] yield (key, self._mapping[key]) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:43: DeprecationWarning: Attribute access is deprecated. self.assertEqual(ConfigDict.Namespace, c.Name.Space.__class__) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /usr/lib64/python3.8/_collections_abc.py:660: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] return self[key] test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:44: DeprecationWarning: Attribute access is deprecated. c.Name.Space.value = 5 test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:44: DeprecationWarning: Attribute assignment is deprecated. c.Name.Space.value = 5 test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:45: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name.Space.value) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:46: DeprecationWarning: Attribute access is deprecated. self.assertTrue('value' in c.Name.Space) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:47: DeprecationWarning: Attribute access is deprecated. self.assertTrue('Space' in c.Name) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:51: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'Name', 5)) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:53: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'keys', 5)) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_configdict.py:56: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name) test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked_meta_fields test/test_environ.py::TestRequest::test_chunked_meta_fields test/test_environ.py::TestRequest::test_chunked_meta_fields /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_environ.py:302: DeprecationWarning: Please use assertEqual instead. self.assertEquals(tob(expect), BaseRequest(e).body.read()) test/test_environ.py::TestResponse::test_content_type /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_environ.py:581: DeprecationWarning: Please use assertEqual instead. self.assertEquals('test/some', rs.headers.get('Content-Type')) test/test_jinja2.py::TestJinja2Template::test_file test/test_jinja2.py::TestJinja2Template::test_notfound test/test_stpl.py::TestSimpleTemplate::test_file test/test_stpl.py::TestSimpleTemplate::test_notfound test/test_stpl.py::TestSimpleTemplate::test_unicode_code /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3230: DeprecationWarning: The template lookup path list should not be empty. self.filename = self.search(self.name, self.lookup) test/test_plugins.py: 15 warnings /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:533: DeprecationWarning: Switch to Plugin API v2 and access the Route object directly. context = self if api > 1 else self._context test/test_plugins.py::TestPluginAPI::test_setup /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_plugins.py:198: DeprecationWarning: Please use assertEqual instead. self.assertEquals(getattr(plugin, 'app', None), self.app) test/test_route.py::TestRoute::test_callback_inspection test/test_route.py::TestRoute::test_callback_inspection /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:557: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() return getargspec(self.get_undecorated_callback())[0] test/test_stpl.py::TestSimpleTemplate::test_coding_stress test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3584: DeprecationWarning: PEP263 encoding strings in templates are deprecated. line, comment = self.fix_backward_compatibility(line, comment) test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:195: DeprecationWarning: Template encodings other than utf8 are no longer supported. value = obj.__dict__[self.func.__name__] = self.func(obj) test/test_stpl.py::TestSimpleTemplate::test_escaped_codelines test/test_stpl.py::TestSimpleTemplate::test_escaped_codelines /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3378: DeprecationWarning: Escape code lines with a backslash. code = parser.translate() test/test_stpl.py::TestSimpleTemplate::test_htmlutils_quote /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_stpl.py:55: DeprecationWarning: Please use assertEqual instead. self.assertEquals('"<' "\\>"', html_quote('<\'\r\n\t"\\>')); test/test_stpl.py::TestSTPLDir::test_old_include test/test_stpl.py::TestSTPLDir::test_old_include_with_args /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3584: DeprecationWarning: The include and rebase keywords are functions now. line, comment = self.fix_backward_compatibility(line, comment) test/test_wsgi.py: 14 warnings /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.19-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:2648: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() spec = getargspec(func) test/test_wsgi.py::TestRouteDecorator::test_name /home/tkloczko/rpmbuild/BUILD/bottle-0.12.19/test/test_wsgi.py:259: DeprecationWarning: Please use assertEqual instead. self.assertEquals('/test/6', bottle.url('foo', x=6)) -- Docs: https://docs.pytest.org/en/stable/warnings.html ========================================================================= short test summary info ========================================================================== FAILED test/test_environ.py::TestResponse::test_delete_cookie - AssertionError: False is not true FAILED test/test_jinja2.py::TestJinja2Template::test_file - bottle.TemplateError: Template './views/jinja2_simple.tpl' not found. FAILED test/test_jinja2.py::TestJinja2Template::test_inherit - bottle.TemplateError: Template 'jinja2_inherit' not found. FAILED test/test_jinja2.py::TestJinja2Template::test_name - bottle.TemplateError: Template 'jinja2_simple' not found. FAILED test/test_outputfilter.py::TestOutputFilter::test_error - AssertionError: The search pattern "ZeroDivisionError" is not included in body: FAILED test/test_outputfilter.py::TestOutputFilter::test_error_in_generator_callback - AssertionError: The search pattern "ZeroDivisionError" is not included in body: FAILED test/test_sendfile.py::TestSendFile::test_download - KeyError: 'Content-Disposition' FAILED test/test_sendfile.py::TestSendFile::test_ims - AssertionError: 304 != 404 FAILED test/test_sendfile.py::TestSendFile::test_mime - KeyError: 'Content-Type' FAILED test/test_sendfile.py::TestSendFile::test_range - FileNotFoundError: [Errno 2] No such file or directory: 'test_sendfile.py' FAILED test/test_sendfile.py::TestSendFile::test_valid - AttributeError: 'str' object has no attribute 'read' FAILED test/test_stpl.py::TestSimpleTemplate::test_file - bottle.TemplateError: Template './views/stpl_simple.tpl' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_include - bottle.TemplateError: Template 'stpl_include' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_name - bottle.TemplateError: Template 'stpl_simple' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_rebase - bottle.TemplateError: Template 'stpl_t2main' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_unicode_code - bottle.TemplateError: Template './views/stpl_unicode.tpl' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_view_decorator_issue_407 - bottle.TemplateError: Template 'stpl_no_vars' not found. FAILED test/test_wsgi.py::TestDecorators::test_view - AssertionError: b'+base+\n+main+\n!1234!\n+include+\n-main-[17 chars]e-\n' != b'\n
kloczek commented 2 years ago

Just retested 0.12.21 + patch

--- a/test/test_environ.py      2022-06-09 10:50:08.693817701 +0300
+++ b/test/test_environ.py      2022-06-09 10:50:36.223708927 +0300
@@ -624,7 +624,7 @@
         response.delete_cookie('name')
         cookies = [value for name, value in response.headerlist
                    if name.title() == 'Set-Cookie']
-        self.assertTrue('name=;' in cookies[0])
+        self.assertTrue('Max-Age=-1' in cookies[0])

     def test_set_header(self):
         response = BaseResponse()

and patch which bases on 9161e24e Here it is result:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra ==================================================================== test session starts ===================================================================== platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21 collected 325 items test/test_auth.py . [ 0%] test/test_config.py ..... [ 1%] test/test_configdict.py ....... [ 4%] test/test_contextlocals.py .. [ 4%] test/test_environ.py ..................................................................... [ 25%] test/test_fileupload.py ......... [ 28%] test/test_formsdict.py .... [ 29%] test/test_importhook.py ..... [ 31%] test/test_jinja2.py ...FFF.... [ 34%] test/test_mdict.py .... [ 35%] test/test_mount.py ......... [ 38%] test/test_outputfilter.py .....FF................. [ 45%] test/test_plugins.py ................... [ 51%] test/test_resources.py ........ [ 54%] test/test_route.py . [ 54%] test/test_router.py ................................ [ 64%] test/test_securecookies.py .... [ 65%] test/test_sendfile.py ....FF.FF.F [ 68%] test/test_server.py ............. [ 72%] test/test_stpl.py ..............F......F.F........F.....F.F............. [ 89%] test/test_wsgi.py ..............................F... [100%] ========================================================================== FAILURES ========================================================================== ________________________________________________________________ TestJinja2Template.test_file ________________________________________________________________ self = def test_file(self): """ Templates: Jinja2 file""" > t = Jinja2Template(name='./views/jinja2_simple.tpl').render(var='var') test/test_jinja2.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/jinja2_simple.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/jinja2_simple.tpl' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ______________________________________________________________ TestJinja2Template.test_inherit _______________________________________________________________ self = def test_inherit(self): """ Templates: Jinja2 lookup and inherience """ > t = Jinja2Template(name='jinja2_inherit', lookup=['./views/']).render() test/test_jinja2.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'jinja2_inherit', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'jinja2_inherit' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ________________________________________________________________ TestJinja2Template.test_name ________________________________________________________________ self = def test_name(self): """ Templates: Jinja2 lookup by name """ > t = Jinja2Template(name='jinja2_simple', lookup=['./views/']).render(var='var') test/test_jinja2.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'jinja2_simple', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'jinja2_simple' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ________________________________________________________________ TestOutputFilter.test_error _________________________________________________________________ self = def test_error(self): self.app.route('/')(lambda: 1/0) self.assertStatus(500) > self.assertInBody('ZeroDivisionError') test/test_outputfilter.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:103: in assertInBody self.fail('The search pattern "%s" is not included in body:\n%s' % (body, result)) E AssertionError: The search pattern "ZeroDivisionError" is not included in body: E b'\n \n \n \n Error: 500 Internal Server Error\n \n \n \n

Error: 500 Internal Server Error

\n

Sorry, the requested URL 'http://127.0.0.1/'\n caused an error:

\n
Internal Server Error
\n \n \n' _____________________________________________________ TestOutputFilter.test_error_in_generator_callback ______________________________________________________ self = def test_error_in_generator_callback(self): @self.app.route('/') def test(): yield 1/0 self.assertStatus(500) > self.assertInBody('ZeroDivisionError') test/test_outputfilter.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:103: in assertInBody self.fail('The search pattern "%s" is not included in body:\n%s' % (body, result)) E AssertionError: The search pattern "ZeroDivisionError" is not included in body: E b'\n \n \n \n Error: 500 Internal Server Error\n \n \n \n

Error: 500 Internal Server Error

\n

Sorry, the requested URL 'http://127.0.0.1/'\n caused an error:

\n
Unhandled exception
\n \n \n' _________________________________________________________________ TestSendFile.test_download _________________________________________________________________ self = def test_download(self): """ SendFile: Download as attachment """ basename = os.path.basename(__file__) f = static_file(basename, root='./', download=True) > self.assertEqual('attachment; filename="%s"' % basename, f.headers['Content-Disposition']) test/test_sendfile.py:83: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = 'Content-Disposition' > def __getitem__(self, key): return self.dict[_hkey(key)][-1] E KeyError: 'Content-Disposition' ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:1970: KeyError ___________________________________________________________________ TestSendFile.test_ims ____________________________________________________________________ self = def test_ims(self): """ SendFile: If-Modified-Since""" request.environ['HTTP_IF_MODIFIED_SINCE'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime()) res = static_file(os.path.basename(__file__), root='./') > self.assertEqual(304, res.status_code) E AssertionError: 304 != 404 test/test_sendfile.py:73: AssertionError ___________________________________________________________________ TestSendFile.test_mime ___________________________________________________________________ self = def test_mime(self): """ SendFile: Mime Guessing""" f = static_file(os.path.basename(__file__), root='./') > self.assertTrue(f.headers['Content-Type'].split(';')[0] in ('application/x-python-code', 'text/x-python')) test/test_sendfile.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = 'Content-Type' > def __getitem__(self, key): return self.dict[_hkey(key)][-1] E KeyError: 'Content-Type' ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:1970: KeyError __________________________________________________________________ TestSendFile.test_range ___________________________________________________________________ self = def test_range(self): basename = os.path.basename(__file__) request.environ['HTTP_RANGE'] = 'bytes=10-25,-80' f = static_file(basename, root='./') > c = open(basename, 'rb'); c.seek(10) E FileNotFoundError: [Errno 2] No such file or directory: 'test_sendfile.py' test/test_sendfile.py:92: FileNotFoundError __________________________________________________________________ TestSendFile.test_valid ___________________________________________________________________ self = def test_valid(self): """ SendFile: Valid requests""" out = static_file(os.path.basename(__file__), root='./') > self.assertEqual(open(__file__,'rb').read(), out.body.read()) E AttributeError: 'str' object has no attribute 'read' test/test_sendfile.py:43: AttributeError ________________________________________________________________ TestSimpleTemplate.test_file ________________________________________________________________ self = def test_file(self): > t = SimpleTemplate(name='./views/stpl_simple.tpl') test/test_stpl.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/stpl_simple.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/stpl_simple.tpl' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ______________________________________________________________ TestSimpleTemplate.test_include _______________________________________________________________ self = def test_include(self): """ Templates: Include statements""" > t = SimpleTemplate(name='stpl_include', lookup=['./views/']) test/test_stpl.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_include', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_include' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ________________________________________________________________ TestSimpleTemplate.test_name ________________________________________________________________ self = def test_name(self): > t = SimpleTemplate(name='stpl_simple', lookup=['./views/']) test/test_stpl.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_simple', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_simple' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError _______________________________________________________________ TestSimpleTemplate.test_rebase _______________________________________________________________ self = def test_rebase(self): """ Templates: %rebase and method passing """ > t = SimpleTemplate(name='stpl_t2main', lookup=['./views/']) test/test_stpl.py:156: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_t2main', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_t2main' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ____________________________________________________________ TestSimpleTemplate.test_unicode_code ____________________________________________________________ self = def test_unicode_code(self): """ Templates: utf8 code in file""" > t = SimpleTemplate(name='./views/stpl_unicode.tpl') test/test_stpl.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/stpl_unicode.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/stpl_unicode.tpl' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ______________________________________________________ TestSimpleTemplate.test_view_decorator_issue_407 ______________________________________________________ self = def test_view_decorator_issue_407(self): @view('stpl_no_vars') def test(): pass > self.assertEqual(touni('hihi'), test()) test/test_stpl.py:239: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3703: in wrapper return template(tpl_name, defaults) ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3673: in template TEMPLATES[tplid] = adapter(name=tpl, lookup=lookup, **settings) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_no_vars', lookup = ['./', './views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_no_vars' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError __________________________________________________________________ TestDecorators.test_view __________________________________________________________________ self = def test_view(self): """ WSGI: Test view-decorator (should override autojson) """ @bottle.route('/tpl') @bottle.view('stpl_t2main') def test(): return dict(content='1234') result = '+base+\n+main+\n!1234!\n+include+\n-main-\n+include+\n-base-\n' self.assertHeader('Content-Type', 'text/html; charset=UTF-8', '/tpl') > self.assertBody(result, '/tpl') test/test_wsgi.py:282: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:98: in assertBody self.assertEqual(tob(body), self.urlopen(route, **kargs)['body']) E AssertionError: b'+base+\n+main+\n!1234!\n+include+\n-main-[17 chars]e-\n' != b'\n \n' ====================================================================== warnings summary ====================================================================== test/test_importhook.py:4 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_importhook.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp test/test_server.py:53 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_server.py:53: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 128: # Import error test/test_server.py:57 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_server.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 3: # Port in use test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_config.py:39: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.foo'], 5) test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_config.py:40: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.bar'], 6) test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_config.py:41: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.baz'], 7) test/test_config.py::TestConfDict::test_meta /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_config.py:32: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['int'], 6) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:30: DeprecationWarning: Attribute assignment is deprecated. c.test = 5 test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:31: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.test) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:34: DeprecationWarning: Attribute access is deprecated. self.assertEqual(6, c.test) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:38: DeprecationWarning: Attribute access is deprecated. self.assertEqual(None, c.test) test/test_configdict.py::TestConfigDict::test_call /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:61: DeprecationWarning: Calling ConfDict is deprecated. Use the update() method. self.assertEqual(c, c(a=1)) test/test_configdict.py::TestConfigDict::test_call /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:63: DeprecationWarning: Attribute access is deprecated. self.assertEqual(1, c.a) test/test_configdict.py::TestConfigDict::test_isadict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:12: DeprecationWarning: Constructor does no longer accept parameters. d, m = dict(a=5), ConfigDict(a=5) test/test_configdict.py::TestConfigDict::test_issue588 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:70: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] self.assertEqual('c', c['a']['b']) test/test_configdict.py::TestConfigDict::test_issue588 /usr/lib64/python3.8/_collections_abc.py:744: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] yield (key, self._mapping[key]) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:43: DeprecationWarning: Attribute access is deprecated. self.assertEqual(ConfigDict.Namespace, c.Name.Space.__class__) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /usr/lib64/python3.8/_collections_abc.py:660: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] return self[key] test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:44: DeprecationWarning: Attribute access is deprecated. c.Name.Space.value = 5 test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:44: DeprecationWarning: Attribute assignment is deprecated. c.Name.Space.value = 5 test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:45: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name.Space.value) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:46: DeprecationWarning: Attribute access is deprecated. self.assertTrue('value' in c.Name.Space) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:47: DeprecationWarning: Attribute access is deprecated. self.assertTrue('Space' in c.Name) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:51: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'Name', 5)) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:53: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'keys', 5)) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:56: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name) test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked_meta_fields test/test_environ.py::TestRequest::test_chunked_meta_fields test/test_environ.py::TestRequest::test_chunked_meta_fields /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_environ.py:302: DeprecationWarning: Please use assertEqual instead. self.assertEquals(tob(expect), BaseRequest(e).body.read()) test/test_environ.py::TestResponse::test_content_type /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_environ.py:581: DeprecationWarning: Please use assertEqual instead. self.assertEquals('test/some', rs.headers.get('Content-Type')) test/test_jinja2.py::TestJinja2Template::test_file test/test_jinja2.py::TestJinja2Template::test_notfound test/test_stpl.py::TestSimpleTemplate::test_file test/test_stpl.py::TestSimpleTemplate::test_notfound test/test_stpl.py::TestSimpleTemplate::test_unicode_code /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3277: DeprecationWarning: The template lookup path list should not be empty. self.filename = self.search(self.name, self.lookup) test/test_plugins.py: 15 warnings /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:551: DeprecationWarning: Switch to Plugin API v2 and access the Route object directly. context = self if api > 1 else self._context test/test_plugins.py::TestPluginAPI::test_setup /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_plugins.py:198: DeprecationWarning: Please use assertEqual instead. self.assertEquals(getattr(plugin, 'app', None), self.app) test/test_stpl.py::TestSimpleTemplate::test_coding_stress test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3631: DeprecationWarning: PEP263 encoding strings in templates are deprecated. line, comment = self.fix_backward_compatibility(line, comment) test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:213: DeprecationWarning: Template encodings other than utf8 are no longer supported. value = obj.__dict__[self.func.__name__] = self.func(obj) test/test_stpl.py::TestSimpleTemplate::test_escaped_codelines test/test_stpl.py::TestSimpleTemplate::test_escaped_codelines /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3425: DeprecationWarning: Escape code lines with a backslash. code = parser.translate() test/test_stpl.py::TestSimpleTemplate::test_htmlutils_quote /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_stpl.py:55: DeprecationWarning: Please use assertEqual instead. self.assertEquals('"<' "\\>"', html_quote('<\'\r\n\t"\\>')); test/test_stpl.py::TestSTPLDir::test_old_include test/test_stpl.py::TestSTPLDir::test_old_include_with_args /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3631: DeprecationWarning: The include and rebase keywords are functions now. line, comment = self.fix_backward_compatibility(line, comment) test/test_wsgi.py::TestRouteDecorator::test_name /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_wsgi.py:259: DeprecationWarning: Please use assertEqual instead. self.assertEquals('/test/6', bottle.url('foo', x=6)) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ================================================================== short test summary info =================================================================== FAILED test/test_jinja2.py::TestJinja2Template::test_file - bottle.TemplateError: Template './views/jinja2_simple.tpl' not found. FAILED test/test_jinja2.py::TestJinja2Template::test_inherit - bottle.TemplateError: Template 'jinja2_inherit' not found. FAILED test/test_jinja2.py::TestJinja2Template::test_name - bottle.TemplateError: Template 'jinja2_simple' not found. FAILED test/test_outputfilter.py::TestOutputFilter::test_error - AssertionError: The search pattern "ZeroDivisionError" is not included in body: FAILED test/test_outputfilter.py::TestOutputFilter::test_error_in_generator_callback - AssertionError: The search pattern "ZeroDivisionError" is not includ... FAILED test/test_sendfile.py::TestSendFile::test_download - KeyError: 'Content-Disposition' FAILED test/test_sendfile.py::TestSendFile::test_ims - AssertionError: 304 != 404 FAILED test/test_sendfile.py::TestSendFile::test_mime - KeyError: 'Content-Type' FAILED test/test_sendfile.py::TestSendFile::test_range - FileNotFoundError: [Errno 2] No such file or directory: 'test_sendfile.py' FAILED test/test_sendfile.py::TestSendFile::test_valid - AttributeError: 'str' object has no attribute 'read' FAILED test/test_stpl.py::TestSimpleTemplate::test_file - bottle.TemplateError: Template './views/stpl_simple.tpl' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_include - bottle.TemplateError: Template 'stpl_include' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_name - bottle.TemplateError: Template 'stpl_simple' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_rebase - bottle.TemplateError: Template 'stpl_t2main' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_unicode_code - bottle.TemplateError: Template './views/stpl_unicode.tpl' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_view_decorator_issue_407 - bottle.TemplateError: Template 'stpl_no_vars' not found. FAILED test/test_wsgi.py::TestDecorators::test_view - AssertionError: b'+base+\n+main+\n!1234!\n+include+\n-main-[17 chars]e-\n' != b'\n
defnull commented 2 years ago

Bottle master branch should be tested with python -m unittest discover as shown in Makefile or pytest as done by the github action.

Bottle release-0.12 should be tested by running test/testall.py as shown in the Makefile or tox.ini. The cleanup that allows tests to run without this wrapper happened after the release of 0.12 and was never back-ported from master.

There is still a single failing tests, but that is caused by a behavior change in pythos stdlib with no real-world impact. The test fails with never python versions, but the code still works as expected. The proposed fix for that test would break for older python versions, so that's not really an improvement.

kloczek commented 2 years ago

pytest can handle correctly written unittest test suite. Also please notice that unittest is no longer extended and is not well maintainmed. This is why +90% of all modules curretnly is not usig unittest and used pytest. I can point as well that using currentl;y pytest with bottle has some vale as it shows many DeprecationWarning warnings. Please do not ignore what shows pytest.

kloczek commented 2 years ago

Here is updated pytest output with 0.12.21

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra ==================================================================== test session starts ===================================================================== platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21 collected 325 items test/test_auth.py . [ 0%] test/test_config.py ..... [ 1%] test/test_configdict.py ....... [ 4%] test/test_contextlocals.py .. [ 4%] test/test_environ.py ..................................................................... [ 25%] test/test_fileupload.py ......... [ 28%] test/test_formsdict.py .... [ 29%] test/test_importhook.py ..... [ 31%] test/test_jinja2.py ...FFF.... [ 34%] test/test_mdict.py .... [ 35%] test/test_mount.py ......... [ 38%] test/test_outputfilter.py .....FF................. [ 45%] test/test_plugins.py ................... [ 51%] test/test_resources.py ........ [ 54%] test/test_route.py . [ 54%] test/test_router.py ................................ [ 64%] test/test_securecookies.py .... [ 65%] test/test_sendfile.py ....FF.FF.F [ 68%] test/test_server.py ............. [ 72%] test/test_stpl.py ..............F......F.F........F.....F.F............. [ 89%] test/test_wsgi.py ..............................F... [100%] ========================================================================== FAILURES ========================================================================== ________________________________________________________________ TestJinja2Template.test_file ________________________________________________________________ self = def test_file(self): """ Templates: Jinja2 file""" > t = Jinja2Template(name='./views/jinja2_simple.tpl').render(var='var') test/test_jinja2.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/jinja2_simple.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/jinja2_simple.tpl' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ______________________________________________________________ TestJinja2Template.test_inherit _______________________________________________________________ self = def test_inherit(self): """ Templates: Jinja2 lookup and inherience """ > t = Jinja2Template(name='jinja2_inherit', lookup=['./views/']).render() test/test_jinja2.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'jinja2_inherit', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'jinja2_inherit' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ________________________________________________________________ TestJinja2Template.test_name ________________________________________________________________ self = def test_name(self): """ Templates: Jinja2 lookup by name """ > t = Jinja2Template(name='jinja2_simple', lookup=['./views/']).render(var='var') test/test_jinja2.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'jinja2_simple', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'jinja2_simple' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ________________________________________________________________ TestOutputFilter.test_error _________________________________________________________________ self = def test_error(self): self.app.route('/')(lambda: 1/0) self.assertStatus(500) > self.assertInBody('ZeroDivisionError') test/test_outputfilter.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:103: in assertInBody self.fail('The search pattern "%s" is not included in body:\n%s' % (body, result)) E AssertionError: The search pattern "ZeroDivisionError" is not included in body: E b'\n \n \n \n Error: 500 Internal Server Error\n \n \n \n

Error: 500 Internal Server Error

\n

Sorry, the requested URL 'http://127.0.0.1/'\n caused an error:

\n
Internal Server Error
\n \n \n' _____________________________________________________ TestOutputFilter.test_error_in_generator_callback ______________________________________________________ self = def test_error_in_generator_callback(self): @self.app.route('/') def test(): yield 1/0 self.assertStatus(500) > self.assertInBody('ZeroDivisionError') test/test_outputfilter.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:103: in assertInBody self.fail('The search pattern "%s" is not included in body:\n%s' % (body, result)) E AssertionError: The search pattern "ZeroDivisionError" is not included in body: E b'\n \n \n \n Error: 500 Internal Server Error\n \n \n \n

Error: 500 Internal Server Error

\n

Sorry, the requested URL 'http://127.0.0.1/'\n caused an error:

\n
Unhandled exception
\n \n \n' _________________________________________________________________ TestSendFile.test_download _________________________________________________________________ self = def test_download(self): """ SendFile: Download as attachment """ basename = os.path.basename(__file__) f = static_file(basename, root='./', download=True) > self.assertEqual('attachment; filename="%s"' % basename, f.headers['Content-Disposition']) test/test_sendfile.py:83: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = 'Content-Disposition' > def __getitem__(self, key): return self.dict[_hkey(key)][-1] E KeyError: 'Content-Disposition' ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:1970: KeyError ___________________________________________________________________ TestSendFile.test_ims ____________________________________________________________________ self = def test_ims(self): """ SendFile: If-Modified-Since""" request.environ['HTTP_IF_MODIFIED_SINCE'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime()) res = static_file(os.path.basename(__file__), root='./') > self.assertEqual(304, res.status_code) E AssertionError: 304 != 404 test/test_sendfile.py:73: AssertionError ___________________________________________________________________ TestSendFile.test_mime ___________________________________________________________________ self = def test_mime(self): """ SendFile: Mime Guessing""" f = static_file(os.path.basename(__file__), root='./') > self.assertTrue(f.headers['Content-Type'].split(';')[0] in ('application/x-python-code', 'text/x-python')) test/test_sendfile.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = 'Content-Type' > def __getitem__(self, key): return self.dict[_hkey(key)][-1] E KeyError: 'Content-Type' ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:1970: KeyError __________________________________________________________________ TestSendFile.test_range ___________________________________________________________________ self = def test_range(self): basename = os.path.basename(__file__) request.environ['HTTP_RANGE'] = 'bytes=10-25,-80' f = static_file(basename, root='./') > c = open(basename, 'rb'); c.seek(10) E FileNotFoundError: [Errno 2] No such file or directory: 'test_sendfile.py' test/test_sendfile.py:92: FileNotFoundError __________________________________________________________________ TestSendFile.test_valid ___________________________________________________________________ self = def test_valid(self): """ SendFile: Valid requests""" out = static_file(os.path.basename(__file__), root='./') > self.assertEqual(open(__file__,'rb').read(), out.body.read()) E AttributeError: 'str' object has no attribute 'read' test/test_sendfile.py:43: AttributeError ________________________________________________________________ TestSimpleTemplate.test_file ________________________________________________________________ self = def test_file(self): > t = SimpleTemplate(name='./views/stpl_simple.tpl') test/test_stpl.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/stpl_simple.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/stpl_simple.tpl' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ______________________________________________________________ TestSimpleTemplate.test_include _______________________________________________________________ self = def test_include(self): """ Templates: Include statements""" > t = SimpleTemplate(name='stpl_include', lookup=['./views/']) test/test_stpl.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_include', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_include' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ________________________________________________________________ TestSimpleTemplate.test_name ________________________________________________________________ self = def test_name(self): > t = SimpleTemplate(name='stpl_simple', lookup=['./views/']) test/test_stpl.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_simple', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_simple' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError _______________________________________________________________ TestSimpleTemplate.test_rebase _______________________________________________________________ self = def test_rebase(self): """ Templates: %rebase and method passing """ > t = SimpleTemplate(name='stpl_t2main', lookup=['./views/']) test/test_stpl.py:156: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_t2main', lookup = ['./views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_t2main' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ____________________________________________________________ TestSimpleTemplate.test_unicode_code ____________________________________________________________ self = def test_unicode_code(self): """ Templates: utf8 code in file""" > t = SimpleTemplate(name='./views/stpl_unicode.tpl') test/test_stpl.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = './views/stpl_unicode.tpl', lookup = [], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template './views/stpl_unicode.tpl' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError ______________________________________________________ TestSimpleTemplate.test_view_decorator_issue_407 ______________________________________________________ self = def test_view_decorator_issue_407(self): @view('stpl_no_vars') def test(): pass > self.assertEqual(touni('hihi'), test()) test/test_stpl.py:239: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3703: in wrapper return template(tpl_name, defaults) ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3673: in template TEMPLATES[tplid] = adapter(name=tpl, lookup=lookup, **settings) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , source = None, name = 'stpl_no_vars', lookup = ['./', './views/'], encoding = 'utf8', settings = {} def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings): """ Create a new template. If the source parameter (str or buffer) is missing, the name argument is used to guess a template filename. Subclasses can assume that self.source and/or self.filename are set. Both are strings. The lookup, encoding and settings parameters are stored as instance variables. The lookup parameter stores a list containing directory paths. The encoding parameter should be used to decode byte strings or files. The settings parameter contains a dict for engine-specific settings. """ self.name = name self.source = source.read() if hasattr(source, 'read') else source self.filename = source.filename if hasattr(source, 'filename') else None self.lookup = [os.path.abspath(x) for x in lookup] self.encoding = encoding self.settings = self.settings.copy() # Copy from class variable self.settings.update(settings) # Apply if not self.source and self.name: self.filename = self.search(self.name, self.lookup) if not self.filename: > raise TemplateError('Template %s not found.' % repr(name)) E bottle.TemplateError: Template 'stpl_no_vars' not found. ../../BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3279: TemplateError __________________________________________________________________ TestDecorators.test_view __________________________________________________________________ self = def test_view(self): """ WSGI: Test view-decorator (should override autojson) """ @bottle.route('/tpl') @bottle.view('stpl_t2main') def test(): return dict(content='1234') result = '+base+\n+main+\n!1234!\n+include+\n-main-\n+include+\n-base-\n' self.assertHeader('Content-Type', 'text/html; charset=UTF-8', '/tpl') > self.assertBody(result, '/tpl') test/test_wsgi.py:282: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/tools.py:98: in assertBody self.assertEqual(tob(body), self.urlopen(route, **kargs)['body']) E AssertionError: b'+base+\n+main+\n!1234!\n+include+\n-main-[17 chars]e-\n' != b'\n \n' ====================================================================== warnings summary ====================================================================== test/test_importhook.py:4 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_importhook.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp test/test_server.py:53 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_server.py:53: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 128: # Import error test/test_server.py:57 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_server.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="? if rv is 3: # Port in use test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_config.py:39: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.foo'], 5) test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_config.py:40: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.b.bar'], 6) test/test_config.py::TestConfDict::test_load_dict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_config.py:41: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['a.baz'], 7) test/test_config.py::TestConfDict::test_meta /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_config.py:32: DeprecationWarning: Please use assertEqual instead. self.assertEquals(c['int'], 6) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:30: DeprecationWarning: Attribute assignment is deprecated. c.test = 5 test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:31: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.test) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:34: DeprecationWarning: Attribute access is deprecated. self.assertEqual(6, c.test) test/test_configdict.py::TestConfigDict::test_attr_access /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:38: DeprecationWarning: Attribute access is deprecated. self.assertEqual(None, c.test) test/test_configdict.py::TestConfigDict::test_call /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:61: DeprecationWarning: Calling ConfDict is deprecated. Use the update() method. self.assertEqual(c, c(a=1)) test/test_configdict.py::TestConfigDict::test_call /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:63: DeprecationWarning: Attribute access is deprecated. self.assertEqual(1, c.a) test/test_configdict.py::TestConfigDict::test_isadict /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:12: DeprecationWarning: Constructor does no longer accept parameters. d, m = dict(a=5), ConfigDict(a=5) test/test_configdict.py::TestConfigDict::test_issue588 /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:70: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] self.assertEqual('c', c['a']['b']) test/test_configdict.py::TestConfigDict::test_issue588 /usr/lib64/python3.8/_collections_abc.py:744: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] yield (key, self._mapping[key]) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:43: DeprecationWarning: Attribute access is deprecated. self.assertEqual(ConfigDict.Namespace, c.Name.Space.__class__) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /usr/lib64/python3.8/_collections_abc.py:660: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"] return self[key] test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:44: DeprecationWarning: Attribute access is deprecated. c.Name.Space.value = 5 test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:44: DeprecationWarning: Attribute assignment is deprecated. c.Name.Space.value = 5 test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:45: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name.Space.value) test/test_configdict.py::TestConfigDict::test_namespaces test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:46: DeprecationWarning: Attribute access is deprecated. self.assertTrue('value' in c.Name.Space) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:47: DeprecationWarning: Attribute access is deprecated. self.assertTrue('Space' in c.Name) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:51: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'Name', 5)) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:53: DeprecationWarning: Attribute assignment is deprecated. self.assertRaises(AttributeError, lambda: setattr(c, 'keys', 5)) test/test_configdict.py::TestConfigDict::test_namespaces /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_configdict.py:56: DeprecationWarning: Attribute access is deprecated. self.assertEqual(5, c.Name) test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked test/test_environ.py::TestRequest::test_chunked_meta_fields test/test_environ.py::TestRequest::test_chunked_meta_fields test/test_environ.py::TestRequest::test_chunked_meta_fields /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_environ.py:302: DeprecationWarning: Please use assertEqual instead. self.assertEquals(tob(expect), BaseRequest(e).body.read()) test/test_environ.py::TestResponse::test_content_type /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_environ.py:581: DeprecationWarning: Please use assertEqual instead. self.assertEquals('test/some', rs.headers.get('Content-Type')) test/test_jinja2.py::TestJinja2Template::test_file test/test_jinja2.py::TestJinja2Template::test_notfound test/test_stpl.py::TestSimpleTemplate::test_file test/test_stpl.py::TestSimpleTemplate::test_notfound test/test_stpl.py::TestSimpleTemplate::test_unicode_code /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3277: DeprecationWarning: The template lookup path list should not be empty. self.filename = self.search(self.name, self.lookup) test/test_plugins.py: 15 warnings /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:551: DeprecationWarning: Switch to Plugin API v2 and access the Route object directly. context = self if api > 1 else self._context test/test_plugins.py::TestPluginAPI::test_setup /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_plugins.py:198: DeprecationWarning: Please use assertEqual instead. self.assertEquals(getattr(plugin, 'app', None), self.app) test/test_stpl.py::TestSimpleTemplate::test_coding_stress test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3631: DeprecationWarning: PEP263 encoding strings in templates are deprecated. line, comment = self.fix_backward_compatibility(line, comment) test/test_stpl.py::TestSimpleTemplate::test_detect_pep263 /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:213: DeprecationWarning: Template encodings other than utf8 are no longer supported. value = obj.__dict__[self.func.__name__] = self.func(obj) test/test_stpl.py::TestSimpleTemplate::test_escaped_codelines test/test_stpl.py::TestSimpleTemplate::test_escaped_codelines /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3425: DeprecationWarning: Escape code lines with a backslash. code = parser.translate() test/test_stpl.py::TestSimpleTemplate::test_htmlutils_quote /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_stpl.py:55: DeprecationWarning: Please use assertEqual instead. self.assertEquals('"<' "\\>"', html_quote('<\'\r\n\t"\\>')); test/test_stpl.py::TestSTPLDir::test_old_include test/test_stpl.py::TestSTPLDir::test_old_include_with_args /home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.21-2.fc35.x86_64/usr/lib/python3.8/site-packages/bottle.py:3631: DeprecationWarning: The include and rebase keywords are functions now. line, comment = self.fix_backward_compatibility(line, comment) test/test_wsgi.py::TestRouteDecorator::test_name /home/tkloczko/rpmbuild/BUILD/bottle-0.12.21/test/test_wsgi.py:259: DeprecationWarning: Please use assertEqual instead. self.assertEquals('/test/6', bottle.url('foo', x=6)) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ================================================================== short test summary info =================================================================== FAILED test/test_jinja2.py::TestJinja2Template::test_file - bottle.TemplateError: Template './views/jinja2_simple.tpl' not found. FAILED test/test_jinja2.py::TestJinja2Template::test_inherit - bottle.TemplateError: Template 'jinja2_inherit' not found. FAILED test/test_jinja2.py::TestJinja2Template::test_name - bottle.TemplateError: Template 'jinja2_simple' not found. FAILED test/test_outputfilter.py::TestOutputFilter::test_error - AssertionError: The search pattern "ZeroDivisionError" is not included in body: FAILED test/test_outputfilter.py::TestOutputFilter::test_error_in_generator_callback - AssertionError: The search pattern "ZeroDivisionError" is not includ... FAILED test/test_sendfile.py::TestSendFile::test_download - KeyError: 'Content-Disposition' FAILED test/test_sendfile.py::TestSendFile::test_ims - AssertionError: 304 != 404 FAILED test/test_sendfile.py::TestSendFile::test_mime - KeyError: 'Content-Type' FAILED test/test_sendfile.py::TestSendFile::test_range - FileNotFoundError: [Errno 2] No such file or directory: 'test_sendfile.py' FAILED test/test_sendfile.py::TestSendFile::test_valid - AttributeError: 'str' object has no attribute 'read' FAILED test/test_stpl.py::TestSimpleTemplate::test_file - bottle.TemplateError: Template './views/stpl_simple.tpl' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_include - bottle.TemplateError: Template 'stpl_include' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_name - bottle.TemplateError: Template 'stpl_simple' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_rebase - bottle.TemplateError: Template 'stpl_t2main' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_unicode_code - bottle.TemplateError: Template './views/stpl_unicode.tpl' not found. FAILED test/test_stpl.py::TestSimpleTemplate::test_view_decorator_issue_407 - bottle.TemplateError: Template 'stpl_no_vars' not found. FAILED test/test_wsgi.py::TestDecorators::test_view - AssertionError: b'+base+\n+main+\n!1234!\n+include+\n-main-[17 chars]e-\n' != b'\n
kloczek commented 2 years ago

FYI on packagin all p[ython modules I'm usig pep517 build procedure:

defnull commented 2 years ago

pytest can handle correctly written unittest test suite.

As I said, the 0.12 branch requires environment adjustments (see test/testall.py) for tests work properly. Just running unitest or pytest won't work. Fixing the test suite for a branch that is in maintenance mode for years now is not my top priority at the moment, so you could either call test/testall.py to run tests (which will also fail because of Python stdlib changes over the years) or wait until someone invests the time and fixes the test environment.

I can point as well that using currentl;y pytest with bottle has some vale as it shows many DeprecationWarning warnings. Please do not ignore what shows pytest.

PRs that fix DeprecationWarnings without breaking stuff are always welcomed.

defnull commented 2 years ago

Failing cookie-test is fixed in release-0.12 (but not released). The test/testall.py requirement is also removed, so pytest and unittest should both work now.