Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
pytest and pytest-coverage fixes
Browse files Browse the repository at this point in the history
- updated pytest.ini, setup.cfg, and .coveragerc
- moved .coveragerc to project root folder since make calls my tests
- pinned pytest-cov==2.5.1 to address pytest-dev/pytest-cov#306
- updated makefile to properly run make test and make coverage
- updated .drone.yml to run coverage during builds and not run un-needed make depoyment
  • Loading branch information
keithdadkins committed Aug 4, 2019
1 parent ce92832 commit a49f12e
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 21 deletions.
3 changes: 0 additions & 3 deletions cli/.coveragerc → .coveragerc
Expand Up @@ -8,6 +8,3 @@ omit =
setup.py
scratch*.py

[html]
directory=./htmlcov

4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -67,13 +67,13 @@ lint:
pylint $(PROJ_SLUG)

smoketest:
pytest --rootdir=cli --cov-config=cli/.coveragerc -k "smoke" -vv cli/tests
pytest --rootdir=cli -k "smoke" -vv cli/tests

test:
pytest --rootdir=cli cli/tests

coverage:
pytest --rootdir=cli --cov-config=cli/.coveragerc -vv cli/tests
pytest --rootdir=cli --cov=cli --cov-config=.coveragerc cli/tests

clean:
rm -rf cli/dist \
Expand Down
13 changes: 12 additions & 1 deletion cli/pytest.ini
@@ -1,4 +1,15 @@
[pytest]
filterwarnings =
ignore::DeprecationWarning
ignore::UserWarning
ignore::UserWarning

testpaths = tests

[run]
omit =
*/venv/*
*/tests/*
*/docs/*
*/dist/*
setup.py
scratch*.py
52 changes: 41 additions & 11 deletions cli/requirements.txt
@@ -1,13 +1,43 @@
boto3==1.9.139
altgraph==0.16.1
astroid==2.2.5
atomicwrites==1.3.0
attrs==19.1.0
boto3==1.9.200
botocore==1.12.200
Click==7.0
configparser==3.7.4
flake8==3.7.7
coverage==4.5.4
docutils==0.14
entrypoints==0.3
flake8==3.7.8
importlib-metadata==0.19
isort==4.3.21
jmespath==0.9.4
lazy-object-proxy==1.4.1
macholib==1.11
mccabe==0.6.1
more-itertools==7.2.0
packaging==19.1
pipdeptree==0.13.2
PyInstaller==3.4
pytest-cov==2.6.1
python-dotenv==0.10.1
PyYAML==5.1
ruamel.yaml==0.15.94
wheel==0.33.1
pylint
pytest
pytest-mock
pluggy==0.12.0
py==1.8.0
pycodestyle==2.5.0
pyflakes==2.1.1
PyInstaller==3.5
pylint==2.3.1
pyparsing==2.4.2
pytest==5.0.1
pytest-cov==2.5.1
pytest-mock==1.10.4
python-dateutil==2.8.0
python-dotenv==0.10.3
PyYAML==5.1.2
ruamel.yaml==0.16.0
ruamel.yaml.clib==0.1.0
s3transfer==0.2.1
six==1.12.0
typed-ast==1.4.0
urllib3==1.25.3
wcwidth==0.1.7
wrapt==1.11.2
zipp==0.5.2
4 changes: 0 additions & 4 deletions cli/setup.cfg
@@ -1,6 +1,2 @@
[flake8]
max-line-length = 99

[tool:pytest]
addopts = --cov=cli -vv
testpaths = tests

0 comments on commit a49f12e

Please sign in to comment.