How do I replicate the same testing configuration in PyCharm, as I have in setup.cfg? Follow
I did enable PyTest from `Settings -> Tools -> Python Integrated Tools -> Testing`
setup.cfg was created by PyScaffold
This is what I have in setup.cfg:
console_scripts =
program = program.main:run
[test]
# py.test options when running `python setup.py test`
# addopts = --verbose
extras = True
[tool:pytest]
# Options for py.test:
# Specify command line options as you would do when invoking py.test directly.
# e.g. --cov-report html (or xml) for html/xml output or --junitxml junit.xml
# in order to write a coverage file that can be read by Jenkins.
addopts =
--cov reddit_users_info --cov-report term-missing
--verbose
[...]
testpaths = tests
How do I replicate these settings in a PyCharm testing configuration?
Please sign in to leave a comment.
Solution: after creating and activating the venv, run this:
Or this:
Then:
But now, how do I make PyCharm understand that certain files/directories are excluded from coverage?
Because right now it shows me "0% files, not covered" for directories like venv and tests.
Dead forum sucks.