diff --git a/documents/references.md b/documents/references.md index 7c8f4c33ad5f5733218ae92ccb1c69a3b7f769e2..f42d45e319443838b4a3987c988b05562eaa833d 100644 --- a/documents/references.md +++ b/documents/references.md @@ -7,7 +7,9 @@ All references to external logic. Includes anything from stack overflow links to ## New References References new to this project. -**None so far.** +### Bash "cd to Script's Directory" +Used to move to the "Script's Directory", regardless of where the script was launched from in the terminal. +<https://stackoverflow.com/a/3355423> ## Old References diff --git a/run_unit_tests.sh b/run_unit_tests.sh new file mode 100755 index 0000000000000000000000000000000000000000..a4dd17c7adfad6c8569f767dcdc2d0b9d6eb555e --- /dev/null +++ b/run_unit_tests.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# Script to run all unittests in project. + + +# Change to location of script's directory. +# Otherwise logic is inconsistent, based on where terminal initially is. +cd "$(dirname "$0")" + + +# Run unittests. +python -m unittest discover ./tests -p "*.py" -t ./