Add a makefile to conveniently run python tests

Change-Id: I9b1bbc9b21d9292eac60715116f02533563fa606
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Frederik Gladhorn 2019-10-10 14:55:35 +02:00
parent ec706c05e1
commit cac594683d
3 changed files with 19 additions and 2 deletions

14
util/cmake/Makefile Normal file
View File

@ -0,0 +1,14 @@
test: flake8 mypy pytest
coverage:
pytest --cov .
flake8:
flake8 *.py --ignore=E501,E266,W503
pytest:
pytest
mypy:
mypy --pretty *.py

View File

@ -4,10 +4,12 @@ verify_ssl = true
name = "pypi" name = "pypi"
[packages] [packages]
pytest = "*"
mypy = "*"
pyparsing = "*" pyparsing = "*"
sympy = "*" sympy = "*"
mypy = "*"
pytest = "*"
pytest-cov = "*"
flake8 = "*"
[dev-packages] [dev-packages]

View File

@ -1,4 +1,5 @@
pytest; python_version >= '3.7' pytest; python_version >= '3.7'
pytest-cov; python_version >= '3.7'
mypy; python_version >= '3.7' mypy; python_version >= '3.7'
pyparsing; python_version >= '3.7' pyparsing; python_version >= '3.7'
sympy; python_version >= '3.7' sympy; python_version >= '3.7'