Use this boilerplate code inside your repo to test it before committing or pushing changes.
-
Install "Make"
# For windows (https://chocolatey.org/install) choco install make # For mac (https://brew.sh/) brew install make # For linux (https://linux.die.net/man/8/apt-get) apt-get -y install make
-
Run setup.py file to create prerequisite files.
python setup.py
For more commands get help:
python setup.py -h
Following files will be created:
- Makefile
- test_commit.py
-
test.py
file is essential to test the code. A template has been added to thetest.py
file. After making changes, when you try to commit the code, the following changes are tested:-
Test cases should be successful
-
Test coverage should not be less than the set limit (default=80%), for both: individual files and the entire repo
-
Lint Score should be atleast the set limit (default=75.0/100.0) for all modified files
-