From 0c38e41444d5db62eb559632f50e8dc873a35bbc Mon Sep 17 00:00:00 2001 From: Michele Sessa Date: Thu, 19 Jan 2023 10:29:17 +0000 Subject: [PATCH] test(scripting-piscine): improve py exercise tester switch from py2 to py3 make pytest stop at first failure --- sh/tests/Dockerfile | 4 ++-- sh/tests/entrypoint.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sh/tests/Dockerfile b/sh/tests/Dockerfile index 4a4dc23c7..63d2c1e43 100644 --- a/sh/tests/Dockerfile +++ b/sh/tests/Dockerfile @@ -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 diff --git a/sh/tests/entrypoint.sh b/sh/tests/entrypoint.sh index bb04bb170..e3994c347 100755 --- a/sh/tests/entrypoint.sh +++ b/sh/tests/entrypoint.sh @@ -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