Skip to content

Instantly share code, notes, and snippets.

@raymondberg
Created May 6, 2019 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raymondberg/334780dede8c921026e2b9033f634729 to your computer and use it in GitHub Desktop.
Save raymondberg/334780dede8c921026e2b9033f634729 to your computer and use it in GitHub Desktop.
Simple test wrapper for vimux stuff while I build out modules for custom tox/etc integrations
run_tests_as_modules () {
args=$@
args_with_dots=${args//\//.}
args_without_semicolon=${args_with_dots//:/.}
args_without_py_suffix=${args_without_semicolon/.py}
echo "Running 'python3 manage.py test $args_without_py_suffix'"
python3 manage.py test $args_without_py_suffix
}
pytest=run_tests_as_modules
nosetests=run_tests_as_modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment