dev-python/socketio-client: Correcting tests

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
Alarig Le Lay 2020-04-26 12:49:32 +02:00
parent 835c99d476
commit ff7a054389
Signed by: alarig
GPG key ID: 7AFE62C6DF8BCDEC

View file

@ -35,11 +35,16 @@ python_test() {
# The import of SocketIO need be made with abs path to run the tests
sed -e 's:from .. import:from socketIO_client import:' \
-i ${REPO_PN}/tests/__init__.py || die
-i socketIO_client/tests/__init__.py || die
sed -e 's:from ..exceptions import:from socketIO_client.exceptions import:' \
-i socketIO_client/tests/__init__.py || die
"${PYTHON}" ${REPO_PN}/tests/__init__.py || die "Tests failed under ${EPYTHON}"
"${PYTHON}" socketIO_client/tests/__init__.py || \
die "Tests failed under ${EPYTHON}"
# Return to original form for final install
sed -e 's:from socketIO_client import:from .. import:' \
-i ${REPO_PN}/tests/__init__.py || die
sed -e 's:from socketIO_client import:from .. import:' \
-i socketIO_client/tests/__init__.py || die
sed -e 's:from socketIO_client.exceptions import:from ..exceptions import:' \
-i socketIO_client/tests/__init__.py || die
}