mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-29 22:28:08 -07:00
dev-python/docker-py: Use localhost instead of hostname in tests
Use 'localhost' in tests since it has a better chance of being resolvable (via /etc/hosts) inside network-sandbox than the system hostname. Closes: https://bugs.gentoo.org/715052 Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -39,6 +39,14 @@ distutils_enable_sphinx docs \
|
||||
'dev-python/recommonmark' \
|
||||
'>=dev-python/sphinx-1.4.6'
|
||||
|
||||
src_prepare() {
|
||||
# localhost has a better chance of being in /etc/hosts
|
||||
sed -e 's:socket[.]gethostname():"localhost":' \
|
||||
-i tests/unit/api_test.py || die
|
||||
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_test() {
|
||||
pytest -vv tests/unit/ || die "tests failed under ${EPYTHON}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user