gleb-sevruk / pycrunch-engine

NCrunch inspired tool for continuous testing Python
https://pycrunch.com
Other
57 stars 8 forks source link

exclusion does not work #80

Closed stefaneidelloth closed 1 year ago

stefaneidelloth commented 1 year ago

I tried to adpt .pychrun-config.yaml to exclude some integration test folder for the unit test coverage (see below).

However, the tests in

back_end/test_integration are still discovered

I tried both, to exclude the whole directory as well as to exclude the individual file.

I use PyCharm 2022.1.2 (Community Edition)

# This configuration file is used by PyCrunch, a PyCharm extension that shows
# pytest coverage in the PyCharm code editor

discovery:
  # some tests should not be considered for the unit test coverage:
  exclusions:
  - back_end/test_integration/
  - back_end/test_integration/calculation/test_calculation.py
engine:
  enable-web-ui: false
  load-pytest-plugins: true
  runtime: pytest
  cpu-cores: 4
pinned-tests: []

image

gleb-sevruk commented 1 year ago

Can you try just the ending suffix instead of full path; And please restart the engine after the configuration changed.

discovery:
  # some tests should not be considered for the unit test coverage:
  exclusions:
  - back_end/test_integration/
  - test_calculation.py

I will try to reproduce this example today to see if it is working as intended

stefaneidelloth commented 1 year ago

a) If I use

discovery:
  exclusions:
  - test_calculation.py

It is excluded. However, another file with the same name in a different folder is excluded, too. And I do not want that.

b) I tried to use \ instead of / as separator in the directory path (I use windows ) and that did the trick.