added -s option to test to skip time consuming tests. also updated readme accordingly

This commit is contained in:
PatchOfScotland
2023-03-16 13:25:44 +01:00
parent a7f910ecff
commit 9547df7612
3 changed files with 43 additions and 4 deletions

View File

@ -7,15 +7,31 @@ starting_working_dir=$(pwd)
script_name=$(basename "$0")
script_dir=$(dirname "$(realpath "$0")")
skip_long_tests=0
for arg in "$@"
do
echo "Given arg: $arg";
if [[ $arg == -s ]]
then
echo "skippy the kangaroo"
skip_long_tests=1
fi
done
cd $script_dir
# Gather all other test files and run pytest
search_dir=.
for entry in "$search_dir"/*
do
if [[ $entry == ./test* ]] && [[ -f $entry ]] && [[ $entry != ./$script_name ]] && [[ $entry != ./shared.py ]];
if [[ $entry == ./test* ]] \
&& [[ -f $entry ]] \
&& [[ $entry != ./$script_name ]] \
&& [[ $entry != ./shared.py ]];
then
pytest $entry "-W ignore::DeprecationWarning"
SKIP_LONG=$skip_long_tests pytest $entry "-W ignore::DeprecationWarning"
# SKIP_LONG=$skip_long_tests pytest $entry
fi
done