Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 795165 - media-sound/gpodder-3.10.20 fails tests: AttributeError: 'ContentServer' object has no attribute 'expect_request' - and similar (attributes from missing pytest_httpserver?)
Summary: media-sound/gpodder-3.10.20 fails tests: AttributeError: 'ContentServer' obje...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-10 06:29 UTC by Agostino Sarubbo
Modified: 2022-05-31 11:20 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,50.02 KB, text/plain)
2021-06-10 06:29 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-06-10 06:29:55 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: media-sound/gpodder-3.10.20 fails tests.
Discovered on: amd64 (internal ref: ci)

NOTE:
This machine uses GCC-11: https://gcc.gnu.org/gcc-11/porting_to.html
If you think this is a GCC-11 related issue, please block bug 732706.
Comment 1 Agostino Sarubbo gentoo-dev 2021-06-10 06:29:58 UTC
Created attachment 715038 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2021-06-10 06:29:59 UTC
Possible context of error(s):

/bin/sh: line 1: --ignore=tests: command not found
Comment 3 Larry the Git Cow gentoo-dev 2021-07-11 06:25:17 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8084a4a457a6ec60022a0dfccf72f9ba178872d

commit f8084a4a457a6ec60022a0dfccf72f9ba178872d
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2021-07-11 06:25:05 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2021-07-11 06:25:14 +0000

    media-sound/gpodder: added missing test dep in 3.10.20
    
    Bug: https://bugs.gentoo.org/795165
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 media-sound/gpodder/gpodder-3.10.20.ebuild | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Comment 4 Miroslav Šulc gentoo-dev 2021-07-11 06:30:36 UTC
a dep was missing. now there are 4 failing tests:

tests/test_feedcore.py FFFF                                                                                                                                                                                                                                                                                          [100%]

========================================================================================================================================================= FAILURES =========================================================================================================================================================
________________________________________________________________________________________________________________________________________________________ test_easy _________________________________________________________________________________________________________________________________________________________

httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140025388062272)>

    def test_easy(httpserver):
        res_data = SIMPLE_RSS
>       httpserver.expect_request('/feed').respond_with_data(SIMPLE_RSS, content_type='text/xml')
E       AttributeError: 'ContentServer' object has no attribute 'expect_request'

tests/test_feedcore.py:58: AttributeError
______________________________________________________________________________________________________________________________________________________ test_redirect _______________________________________________________________________________________________________________________________________________________

httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140025388062272)>

    def test_redirect(httpserver):
        res_data = SIMPLE_RSS
>       httpserver.expect_request('/endfeed').respond_with_data(SIMPLE_RSS, content_type='text/xml')
E       AttributeError: 'ContentServer' object has no attribute 'expect_request'

tests/test_feedcore.py:70: AttributeError
____________________________________________________________________________________________________________________________________________________ test_redirect_loop ____________________________________________________________________________________________________________________________________________________

httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140025388062272)>

    def test_redirect_loop(httpserver):
        """ verify that feedcore fetching will not loop indefinitely on redirects """
        redir_headers = {
            'Location': '/feed',  # it loops
        }
>       httpserver.expect_request('/feed').respond_with_data(status=302, headers=redir_headers)
E       AttributeError: 'ContentServer' object has no attribute 'expect_request'

tests/test_feedcore.py:96: AttributeError
________________________________________________________________________________________________________________________________________________ test_temporary_error_retry ________________________________________________________________________________________________________________________________________________

httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140025388062272)>

    def test_temporary_error_retry(httpserver):
>       httpserver.expect_ordered_request('/feed').respond_with_data(status=503)
E       AttributeError: 'ContentServer' object has no attribute 'expect_ordered_request'

tests/test_feedcore.py:108: AttributeError
================================================================================================================================================= short test summary info ==================================================================================================================================================
FAILED tests/test_feedcore.py::test_easy - AttributeError: 'ContentServer' object has no attribute 'expect_request'
FAILED tests/test_feedcore.py::test_redirect - AttributeError: 'ContentServer' object has no attribute 'expect_request'
FAILED tests/test_feedcore.py::test_redirect_loop - AttributeError: 'ContentServer' object has no attribute 'expect_request'
FAILED tests/test_feedcore.py::test_temporary_error_retry - AttributeError: 'ContentServer' object has no attribute 'expect_ordered_request'
==================================================================================================================================================== 4 failed in 2.28s =====================================================================================================================================================


i'm not a python guy, but i found the missing attributes in package called pytest_httpserver (https://github.com/csernazs/pytest-httpserver/) which we do not have packaged. still, not sure whether that's the correct path or not. can python guys help please?
Comment 5 Miroslav Šulc gentoo-dev 2021-08-21 18:40:55 UTC
3.10.21 fails the same way...
Comment 6 Larry the Git Cow gentoo-dev 2022-05-31 11:20:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af1b429fe4bafcc7377b5bbba414068ef7ba3fb3

commit af1b429fe4bafcc7377b5bbba414068ef7ba3fb3
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-05-31 11:18:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-05-31 11:20:06 +0000

    media-sound/gpodder: add Python 3.10, fix tests
    
    Closes: https://bugs.gentoo.org/846065
    Closes: https://bugs.gentoo.org/795165
    Signed-off-by: Sam James <sam@gentoo.org>

 media-sound/gpodder/gpodder-3.10.21-r1.ebuild | 80 +++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c09a2622f9ea123899e7c94811279a41af146ae6

commit c09a2622f9ea123899e7c94811279a41af146ae6
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-05-31 11:17:56 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-05-31 11:20:05 +0000

    dev-python/pytest-httpserver: new package, add 1.0.4
    
    Bug: https://bugs.gentoo.org/795165
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/pytest-httpserver/Manifest              |  1 +
 dev-python/pytest-httpserver/metadata.xml          | 13 ++++++++
 .../pytest-httpserver-1.0.4.ebuild                 | 35 ++++++++++++++++++++++
 3 files changed, 49 insertions(+)