You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gallery-dl/scripts/run_tests.sh

23 lines
478 B

#!/bin/bash
TESTS_CORE=(config cookies downloader extractor oauth text util)
TESTS_RESULTS=(results)
# select tests
TESTS=()
case "${GALLERYDL_TESTS}" in
core) TESTS=( ${TESTS_CORE[@]} );;
results) TESTS=( ${TESTS_RESULTS[@]} );;
esac
# transform each array element to test_###.py
TESTS=( ${TESTS[@]/#/test_} )
TESTS=( ${TESTS[@]/%/.py} )
# run 'nosetests' with selected tests
# (or all tests if ${TESTS} is empty)
nosetests --verbose -w test ${TESTS[@]}