Ensuring pep8 runs even when nose optons are passed
This commit is contained in:
parent
3368a35ff9
commit
e20444542a
@ -25,6 +25,7 @@ function process_option {
|
|||||||
-N|--no-virtual-env) let always_venv=0; let never_venv=1;;
|
-N|--no-virtual-env) let always_venv=0; let never_venv=1;;
|
||||||
-f|--force) let force=1;;
|
-f|--force) let force=1;;
|
||||||
-p|--pep8) let just_pep8=1;;
|
-p|--pep8) let just_pep8=1;;
|
||||||
|
-*) noseopts="$noseopts $1";;
|
||||||
*) noseargs="$noseargs $1"
|
*) noseargs="$noseargs $1"
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@ -35,6 +36,7 @@ always_venv=0
|
|||||||
never_venv=0
|
never_venv=0
|
||||||
force=0
|
force=0
|
||||||
noseargs=
|
noseargs=
|
||||||
|
noseopts=
|
||||||
wrapper=""
|
wrapper=""
|
||||||
just_pep8=0
|
just_pep8=0
|
||||||
|
|
||||||
@ -73,7 +75,7 @@ function run_pep8 {
|
|||||||
--exclude=vcsversion.py ${srcfiles}
|
--exclude=vcsversion.py ${srcfiles}
|
||||||
}
|
}
|
||||||
|
|
||||||
NOSETESTS="python run_tests.py $noseargs"
|
NOSETESTS="python run_tests.py $noseopts $noseargs"
|
||||||
|
|
||||||
if [ $never_venv -eq 0 ]
|
if [ $never_venv -eq 0 ]
|
||||||
then
|
then
|
||||||
@ -108,7 +110,10 @@ fi
|
|||||||
|
|
||||||
run_tests || exit
|
run_tests || exit
|
||||||
|
|
||||||
# Also run pep8 if no options were provided.
|
# NOTE(sirp): we only want to run pep8 when we're running the full-test suite,
|
||||||
|
# not when we're running tests individually. To handle this, we need to
|
||||||
|
# distinguish between options (noseopts), which begin with a '-', and
|
||||||
|
# arguments (noseargs).
|
||||||
if [ -z "$noseargs" ]; then
|
if [ -z "$noseargs" ]; then
|
||||||
run_pep8
|
run_pep8
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user