mirror of https://github.com/01-edu/public.git
test(scripting-piscine): improve py exercise tester
switch from py2 to py3 make pytest stop at first failure
This commit is contained in:
parent
ef07f294a1
commit
0c38e41444
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue