aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2021-12-21 09:45:20 -0800
committerGravatar MarkKoz <[email protected]>2021-12-21 09:45:20 -0800
commit48646687887c700f9300e281de7d383b044e4b6f (patch)
tree5318220f9e52347a3ca18c5349a3d4276cc4c1ef
parentFix NsJail args test (diff)
Install numpy before running tests locally
`test_numpy_import` fails when running with `pipenv run tests`, since numpy was not installed. Modify the pipenv script to install numpy before starting the tests.
-rw-r--r--Pipfile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Pipfile b/Pipfile
index e814d6b..c630530 100644
--- a/Pipfile
+++ b/Pipfile
@@ -40,9 +40,10 @@ precommit = "pre-commit install"
# Testing
report = "coverage report"
# Fix ownership of the coverage file even if tests fail & preserve exit code
+# Install numpy because a test checks if it's importable
test = """
docker-compose run --entrypoint /bin/bash --rm snekbox -c \
- 'coverage run -m unittest; e=$?; chown --reference=. .coverage; exit $e'
+ 'env PYTHONUSERBASE=/snekbox/user_base pip install numpy && coverage run -m unittest; e=$?; chown --reference=. .coverage; exit $e'
"""
# Docker