diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -115,7 +115,7 @@ Vela is licensed under [Apache License 2.0](LICENSE.txt) Contributions are accepted under Apache-2.0. Only submit contributions where you have authored all of the code. -### Sanity checks +### Sanity checks and tests The Python codebase is PEP8 compliant with the exception of 120 characters line length. We run reorder-python-import, black and flake8 against the code base excluding "ethosu/vela/tflite/" and "ethosu/vela/ethos\_u55\_regs" directories because they are auto-generated by third party tools. @@ -130,6 +130,9 @@ pipenv install -e . --dev ``` After the installation, pre-commit is available in the virtual environment. +Besides pre-commit, we install also: +* pytest: testing framework +* pytest-cov: code coverage plugin for pytest #### Install the pre-commit hook @@ -143,6 +146,16 @@ pre-commit installed at .git/hooks/pre-commit The checks will be run before the commit: if one of them fails, you need to fix the code to make the checks pass. +#### Run the tests + +Tests and test coverage can be run using pre-commit framework. + +``` +$ pre-commit run pytest +... +$ pre-commit run pytest-cov +``` + #### Run the sanity checks Those checks can be run manually. This can be achievied running the following @@ -160,4 +173,7 @@ $ pre-commit run --all-files Reorder python imports...................................................Passed black....................................................................Passed flake8...................................................................Passed +pytest...................................................................Passed +... +... ``` |