0

Let's say I have two differnt types of tests I want to run: unit tests and functional tests (What is the difference between unit tests and functional tests?). How can I set up different passing % criteria in my workflow?

Folders:

mypackage/tests/unittests --> test_foo1.py; test_foo2.py; etc. mypackage/tests/functests --> test_bar1.py; test_bar2.py; etc.

How do I adjust the setup.config file to have 90% required for unittests and 50% required for functional when running pytest --cov?

# ...
[tool:pytest]
testpaths = tests

[coverage:run]
source = mypackage
branch = True
relative_files = True

[coverage:report]
fail_under = 90.0
show_missing = True
skip_covered = False
a11
  • 3,122
  • 4
  • 27
  • 66
  • there is nothing out of the box for this, you will probably have to create some custom functionality/logic – gold_cy Feb 09 '23 at 12:31

0 Answers0