Skip to content

Commit

Permalink
Added nice output for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Irreq committed Sep 30, 2023
1 parent 533ca05 commit 9ca7562
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

# Run the unit tests using unittest
python3 -m unittest discover -s $(pwd) -vv

# Check the exit code of the unittest command
if [ $? -eq 0 ]; then
# If the exit code is 0 (success), display "All tests passed" in green
echo -e "\n\e[32m ALL TESTS PASSED\e[0m\n"
else
# If the exit code is not 0 (failure), display "Tests failed" in red
echo -e "\n\e[31m TESTS FAILED\e[0m\n"
fi

0 comments on commit 9ca7562

Please sign in to comment.