From af42f52d2be2d59d8003a9fce437ee7e75af3a72 Mon Sep 17 00:00:00 2001 From: xxc Date: Tue, 26 Jan 2021 14:09:44 +0800 Subject: [PATCH] add pytest and tox configuration --- MANIFEST.in | 2 +- pytest.ini | 8 ++++++++ requirements.txt | 2 ++ tox.ini | 19 +++++++++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 pytest.ini create mode 100644 tox.ini diff --git a/MANIFEST.in b/MANIFEST.in index c334445..3757e87 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include src/bison/c/bisondynlib.h +include src/bison/c/* diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..35af5bc --- /dev/null +++ b/pytest.ini @@ -0,0 +1,8 @@ +# pytest.ini +[pytest] +minversion = 6.0 +addopts = -ra -q +python_files = tests.py test_*.py *_tests.py +testpaths = + src + tests diff --git a/requirements.txt b/requirements.txt index cfa25d1..db2e221 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ six Cython +pytest +pytest-cov \ No newline at end of file diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..c4a5588 --- /dev/null +++ b/tox.ini @@ -0,0 +1,19 @@ +# content of: tox.ini , put in same dir as setup.py +[tox] +envlist = py39,py38 + +[pytest] +minversion = 6.0 +addopts = -ra -q +testpaths = + src + +[testenv] +deps = + pytest + pytest-cov + +commands = + pip install -r requirements.txt + pytest +