babel/tests/run-unit-tests-on-installed-pkg.sh
Honza Horak aa275fb893 Replace whole repo with latest content from branch rhel-8.8.0
Content corresponds with RHEL dist-git commit b09f88c
2023-05-15 16:27:51 +02:00

28 lines
645 B
Bash
Executable File

#!/bin/bash
# Run Babel's unit tests with the installed packages.
# bail out if anything goes wrong
set -e
# run in its own subdirectory without the whole sources underneath
mkdir testrun
# first, copy over unit tests and make them find the installed modules and
# files as if they were an exploded source tarball
cp -r source/tests testrun/
# test_frontend needs python3-freezegun
rm testrun/tests/messages/test_frontend.py
BABELDIR="$(python3 -c 'import os.path; import babel; print(os.path.dirname(babel.__file__))')"
ln -snf "$BABELDIR" testrun/babel
pushd testrun
# run the tests
export TZ=America/New_York
pytest-3
popd # testrun