Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-python/pytest-subtests: fix tests if pakcage ...
is not already installed Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
- Loading branch information
0e4e63d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this fixing pytest-dev/pytest-subtests#21 ?
0e4e63d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhm, not sure, I didn't get that error ( I think ). I just noticed that tests failed if the package wasn't already installed
Usually this means that the builddir ${WORKDIR}/${PN}-${EPYTHON}/lib (which is added to PYTHONPATH by the default test function) does not contain all the necessary files for testing. Setting PYHTONPATH to the source dir instead makes sure that all the files are available in PYTHONPATH, not just those that will be installed to the system.
When I find that a package tests fail when it is not already installed I always try the PYTHONPATH workaround first, if that doesn't work the
distutils-r1_install_for_tests
function might help. If it still doesn't work then DEPEND="test? ( ${P} )" might work, but only as a last resort, because circular dependencies are very annoying for end users, because they require manual intervention.Anyway, pytest-subtests tests now work for me even if the package is not already installed. Does it work for you too? Otherwise we might be missing a dependency here.
0e4e63d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now work