test(scripting-piscine): improve py exercise tester

switch from py2 to py3
make pytest stop at first failure
This commit is contained in:
Michele Sessa 2023-01-19 10:29:17 +00:00
parent ef07f294a1
commit 0c38e41444
2 changed files with 3 additions and 3 deletions

View File

@ -2,8 +2,8 @@ FROM docker.01-edu.org/debian:10.9-slim
RUN apt-get update
RUN apt-get -y install jq curl
RUN apt-get -y install python-pip
RUN pip install -U pytest
RUN apt-get -y install python3-pip
RUN pip3 install -U pytest
WORKDIR /app/assets/superhero
RUN curl --remote-name --location https://demo.01-edu.org/assets/superhero/all.json

View File

@ -9,7 +9,7 @@ cd app
if test -f "${EXERCISE}_test.sh"; then
bash "${EXERCISE}_test.sh"
elif test -f "${EXERCISE}_test.py"; then
pytest "${EXERCISE}_test.py"
pytest -x "${EXERCISE}_test.py"
else
echo "No test file found for the exercise : $EXERCISE"
exit 1