-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathpytest
More file actions
executable file
·29 lines (23 loc) · 902 Bytes
/
pytest
File metadata and controls
executable file
·29 lines (23 loc) · 902 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
################################################################################
# Runs pytest on the repository.
#
# Usage:
# check/pytest [--flags for pytest]
#
################################################################################
# Get the working directory to the repo root.
thisdir="$(dirname "${BASH_SOURCE[0]}")" || exit $?
topdir="$(git -C "${thisdir}" rev-parse --show-toplevel)" || exit $?
cd "${topdir}" || exit $?
echo "Warning: running the full test suite, which may take tens of minutes."
echo ""
echo " To run the recommended test suite for development: use check/pytest-quick"
echo " To suppress this warning: use check/pytest-full"
echo ""
# Run in parallel by default. Pass the `-n0` option for a single-process run.
# (the last `-n` option wins)
PYTEST_ARGS=( "-n=auto" "$@" )
pytest "${PYTEST_ARGS[@]}" qualtran/
RESULT=$?
exit "$RESULT"