Enable pytest pre-commit

Change-Id: Ia00a9fa0d260c68ce8532dec9925467558fe7dea
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1658ca9..f2ccc3f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -18,3 +18,13 @@
     rev: 4.0.1
     hooks:
     -   id: flake8
+
+-   repo: local
+    hooks:
+    -   id: pytest
+        name: pytest
+        stages: [commit]
+        language: system
+        entry: pytest
+        types: [python]
+        pass_filenames: false
diff --git a/scripts/py-dev-env.bash b/scripts/py-dev-env.bash
index 82c16e3..1de566d 100644
--- a/scripts/py-dev-env.bash
+++ b/scripts/py-dev-env.bash
@@ -17,6 +17,7 @@
     SCRIPTS_DIR=$(dirname $(readlink -f "${BASH_SOURCE[0]}"))
     REFMODEL_DIR=$(dirname "$SCRIPTS_DIR")
     pip install -e "$REFMODEL_DIR"
+    pip install pytest
     export PYTHONPATH="$SCRIPTS_DIR:$REFMODEL_DIR/thirdparty/serialization_lib/python"
     echo "Set PYTHONPATH=$PYTHONPATH"
 else
diff --git a/scripts/py-dev-env.sh b/scripts/py-dev-env.sh
index 904ff80..cc5da72 100644
--- a/scripts/py-dev-env.sh
+++ b/scripts/py-dev-env.sh
@@ -15,6 +15,7 @@
 
 if [ -e "setup.cfg" ]; then
     pip install -e .
+    pip install pytest
     export PYTHONPATH=$PWD/scripts:$PWD/thirdparty/serialization_lib/python
     echo "Set PYTHONPATH=$PYTHONPATH"
 else
diff --git a/setup.cfg b/setup.cfg
index 369d139..6420a40 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -27,6 +27,7 @@
     generator
     checker
     frameworks
+    tests
     xunit
     json2fbbin
     json2numpy