If pytest is not yet installed on the system, then dev-python/pytest-4.6.9 fails the test test_pytest_entry_points_are_identical with "PackageNotFoundError: pytest". This is expected as it is not installed and thus cannot be found. The solution is simple: use distutils_install_for_testing prior to running the test suite. The python_test() function would look like: python_test() { # The following line is new: distutils_install_for_testing # In v4.1.1, pytest started being picky about its own verbosity options. # running pytest on itself with -vv made 3 tests fail. This is why we don't # have it below. "${EPYTHON}" "${BUILD_DIR}"/lib/pytest.py --lsof -rfsxX \ || die "tests failed with ${EPYTHON}" } Not tested but it seems that other pytest versions are affected, too.
Thanks for the report. Indeed I can reproduce this on a fresh install. I'm going to push the fix soonish.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6025336afa774618665d597e273221ba89cd5c31 commit 6025336afa774618665d597e273221ba89cd5c31 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2020-05-13 08:30:53 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2020-05-13 09:02:59 +0000 dev-python/pytest: Fix tests on initial install Closes: https://bugs.gentoo.org/715318 Signed-off-by: Michał Górny <mgorny@gentoo.org> dev-python/pytest/pytest-4.6.10.ebuild | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
> Thanks for the report. Thanks for fixing.