Skip to content

Commit

Permalink
Improve test coverage of the Setuptools build script by installing th…
Browse files Browse the repository at this point in the history
…e Wheel and calling the betty command (#1456)
  • Loading branch information
bartfeenstra authored May 4, 2024
1 parent eb45836 commit a3ccfb1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bin/test-build-setuptools
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,18 @@ if [ $build_exit_code -ne 0 ]; then
echo "$build_output"
exit $build_exit_code
fi
wheel_path="$(pwd)/dist/betty-0.0.0-py3-none-any.whl"
(
working_directory_path="$(mktemp -d)"
trap 'rm -r "$working_directory_path"' EXIT
cd "$working_directory_path"
python -m virtualenv venv
# shellcheck disable=SC1091
if python -c 'import sys; exit(0 if sys.platform == "win32" else 1)'; then
. ./venv/Scripts/activate
else
. ./venv/bin/activate
fi
pip install "$wheel_path"
betty --version
)
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ test = [
'types-pyyaml ~= 6.0, >= 6.0.6',
'types-requests ~= 2.29, >= 2.29.0.0',
'types-setuptools ~= 69.0',
'virtualenv ~= 20.26',
'betty[pyinstaller]',
'betty[setuptools]',
]
Expand Down

0 comments on commit a3ccfb1

Please sign in to comment.