From cac594683dc84b2d202d2c6dbb75798ae7684f40 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Thu, 10 Oct 2019 14:55:35 +0200 Subject: [PATCH] Add a makefile to conveniently run python tests Change-Id: I9b1bbc9b21d9292eac60715116f02533563fa606 Reviewed-by: Alexandru Croitor --- util/cmake/Makefile | 14 ++++++++++++++ util/cmake/Pipfile | 6 ++++-- util/cmake/requirements.txt | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 util/cmake/Makefile diff --git a/util/cmake/Makefile b/util/cmake/Makefile new file mode 100644 index 00000000000..402e45b7070 --- /dev/null +++ b/util/cmake/Makefile @@ -0,0 +1,14 @@ + +test: flake8 mypy pytest + +coverage: + pytest --cov . + +flake8: + flake8 *.py --ignore=E501,E266,W503 + +pytest: + pytest + +mypy: + mypy --pretty *.py diff --git a/util/cmake/Pipfile b/util/cmake/Pipfile index 7fbf716eb8d..941e848c345 100644 --- a/util/cmake/Pipfile +++ b/util/cmake/Pipfile @@ -4,10 +4,12 @@ verify_ssl = true name = "pypi" [packages] -pytest = "*" -mypy = "*" pyparsing = "*" sympy = "*" +mypy = "*" +pytest = "*" +pytest-cov = "*" +flake8 = "*" [dev-packages] diff --git a/util/cmake/requirements.txt b/util/cmake/requirements.txt index 4d42912956f..16febdd4a34 100644 --- a/util/cmake/requirements.txt +++ b/util/cmake/requirements.txt @@ -1,4 +1,5 @@ pytest; python_version >= '3.7' +pytest-cov; python_version >= '3.7' mypy; python_version >= '3.7' pyparsing; python_version >= '3.7' sympy; python_version >= '3.7'