Created attachment 604256 [details, diff]
use distutils_install_for_testing() in python_test()
The test suite of dev-python/flake8 does not use the flake8 which is about to get merged but instead uses the old version already installed on the system.
This behaviour can be experienced when running the test suite of flake8-3.7.9 with dev-python/pycodestyle-2.5.0 and the old flake8-3.5.0 installed. In this situation the tests fail due to the incompatibility of flake8-3.5.0 and pycodestyle-2.5.0 (see ), which is fixed in >=flake8-3.6.0.
To make the test suite use the flake8 version which is about to be merged, distutils_install_for_testing()  should be used in python_test() before running the test suite.
A diff is attached which can be applied to flake8-3.7.9.ebuild.
The bug has been closed via the following commit(s):
Author: Louis Sautier <email@example.com>
AuthorDate: 2020-10-02 12:32:12 +0000
Commit: Louis Sautier <firstname.lastname@example.org>
CommitDate: 2020-10-02 13:08:22 +0000
dev-python/flake8: bump to 3.8.3, fix tests, re-add doc
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Louis Sautier <email@example.com>
dev-python/flake8/Manifest | 1 +
dev-python/flake8/files/flake8-3.8.3-pytest6.patch | 40 ++++++++++++++++++
dev-python/flake8/flake8-3.8.3.ebuild | 47 ++++++++++++++++++++++
3 files changed, 88 insertions(+)