added -s option to test to skip time consuming tests. also updated readme accordingly
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user