28 lines
645 B
Bash
Executable File
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
|