Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 836619 - dev-python/ini2toml-0.10: FAILED tests/test_plugins.py::test_list_from_entry_points
Summary: dev-python/ini2toml-0.10: FAILED tests/test_plugins.py::test_list_from_entry_...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 836568
  Show dependency tree
 
Reported: 2022-04-01 23:30 UTC by Yixun Lan
Modified: 2022-04-04 14:52 UTC (History)
3 users (show)

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


Attachments
build.log (build.log.xz,3.45 KB, application/x-xz)
2022-04-01 23:31 UTC, Yixun Lan
Details
log (dev-python:ini2toml-0.10:20220402-084150.log,17.15 KB, text/x-log)
2022-04-02 08:46 UTC, ArchFeh(Yu Gu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yixun Lan archtester gentoo-dev 2022-04-01 23:30:57 UTC
test on amd64 and riscv, both fail at same error

========================================================================== FAILURES ===========================================================================
_________________________________________________________________ test_list_from_entry_points _________________________________________________________________

    def test_list_from_entry_points():
        # Should return a list with all the plugins registered in the entrypoints
        pluging_list = plugins.list_from_entry_points()
        orig_len = len(pluging_list)
        assert all(callable(e) for e in pluging_list)
        plugin_names = " ".join(str(e.__module__) for e in pluging_list)
        for example in EXISTING:
            assert example in plugin_names

        # a filtering function can be passed to avoid loading plugins that are not needed
        pluging_list = plugins.list_from_entry_points(filtering=lambda e: e.name != "isort")
        plugin_names = " ".join(str(e.__module__) for e in pluging_list)
>       assert len(pluging_list) == orig_len - 1
E       assert 12 == 13
E         +12
E         -13


......


=================================================================== short test summary info ===================================================================
FAILED tests/test_plugins.py::test_list_from_entry_points - assert 12 == 13
==================================================== 1 failed, 42 passed, 7 deselected, 1 warning in 1.89s ====================================================
 * ERROR: dev-python/ini2toml-0.10::gentoo failed (test phase):
Comment 1 Yixun Lan archtester gentoo-dev 2022-04-01 23:31:58 UTC
Created attachment 768449 [details]
build.log
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-04-02 06:54:30 UTC
My totally random guess is that it's collecting plugins from both build tree and installed system, hence twice the number.
Comment 3 ArchFeh(Yu Gu) 2022-04-02 08:46:44 UTC
Created attachment 768467 [details]
log

But I passed all tests in my starlight board.
Comment 4 James Le Cuirot gentoo-dev 2022-04-02 20:57:36 UTC
I saw this too on m68k. It works if you run "pytest test_plugins.py" outside of Portage.
Comment 5 Yixun Lan archtester gentoo-dev 2022-04-02 23:12:36 UTC
(In reply to Michał Górny from comment #2)
> My totally random guess is that it's collecting plugins from both build tree
> and installed system, hence twice the number.

yes, confirm this problem due to dev-python/ini2toml is already installed.
Comment 6 Larry the Git Cow gentoo-dev 2022-04-04 14:52:56 UTC
The bug has been closed via the following commit(s):

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

commit 92f6cc68200a6219a16116aba9750f06ad204b55
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2022-04-04 07:45:50 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-04-04 14:51:25 +0000

    dev-python/ini2toml: Backport test fix
    
    Closes: https://bugs.gentoo.org/836619
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/ini2toml/files/ini2toml-0.10-test.patch | 39 ++++++++++++++++++++++
 dev-python/ini2toml/ini2toml-0.10.ebuild           |  4 +++
 2 files changed, 43 insertions(+)