Skip to content

Commit

Permalink
Merge branch 'master' into fix-coverage-exclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
pavoljuhas committed Aug 18, 2023
2 parents 4e708d5 + 6b44704 commit 36b8150
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion check/doctest
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ thisdir="$(dirname "${BASH_SOURCE[0]}")" || exit $?
topdir="$(git -C "${thisdir}" rev-parse --show-toplevel)" || exit $?
cd "${topdir}" || exit $?

source dev_tools/pypath
source dev_tools/pypath || exit $?

python dev_tools/docs/run_doctest.py "$@"
2 changes: 1 addition & 1 deletion check/pytest
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cd "${topdir}" || exit $?
# (the last `-n` option wins)
PYTEST_ARGS=( "-n=auto" "$@" )

source dev_tools/pypath
source dev_tools/pypath || exit $?

pytest "${PYTEST_ARGS[@]}"
RESULT=$?
Expand Down
2 changes: 1 addition & 1 deletion check/pytest-and-incremental-coverage
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ else
rev="${base}"
fi

source dev_tools/pypath
source dev_tools/pypath || exit $?

# Run tests while producing coverage files.
check/pytest --cov \
Expand Down
2 changes: 1 addition & 1 deletion check/pytest-changed-files
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ if [ "${num_changed}" -eq 0 ]; then
exit 0
fi

source dev_tools/pypath
source dev_tools/pypath || exit $?

pytest "${rest[@]}" "${changed[@]}"
2 changes: 1 addition & 1 deletion check/pytest-changed-files-and-incremental-coverage
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ if [ "${#changed_python_tests[@]}" -eq 0 ]; then
exit 0
fi

source dev_tools/pypath
source dev_tools/pypath || exit $?

# Run tests while producing coverage files.
check/pytest "${changed_python_tests[@]}" \
Expand Down
6 changes: 6 additions & 0 deletions dev_tools/pypath
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ else
_PYPATH_BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
fi

if ! python --version | grep -q -F "Python 3."; then
echo "python command does not start Python 3" >&2
echo "Please use a virtual environment created for Python 3." >&2
return 2
fi

_PYPATH_PREFIX="${_PYPATH_BASE_DIR}$(
cd "${_PYPATH_BASE_DIR}" &&
env PYTHONPATH=. python dev_tools/modules.py list --mode folder |
Expand Down

0 comments on commit 36b8150

Please sign in to comment.