discover: how: shell dist-git-source: true tests: - name: smoke test: pybabel --list-locales - name: smoke2 test: /usr/libexec/platform-python smoke.py path: /tests - name: unit tests test: | cleanup(){ if [[ -n $TmpDir ]] && test -d $TmpDir; then rm -rf $TmpDir fi } trap cleanup EXIT TmpDir=$(mktemp -d) # first, copy over unit tests and make them find the installed modules and # files as if they were an exploded source tarball cp -r $TMT_SOURCE_DIR/Babel-*/tests $TmpDir/ # test_frontend needs python3-freezegun rm $TmpDir/tests/messages/test_frontend.py BABELDIR="$(/usr/libexec/platform-python -c 'import os.path; import babel; print(os.path.dirname(babel.__file__))')" ln -snf "$BABELDIR" $TmpDir/babel pushd $TmpDir # run the tests export TZ=America/New_York pytest-3 popd execute: how: tmt prepare: - name: install packages how: install package: - python3-babel - python3-pytest