Exclude specific plugins from xunit2 output
See original GitHub issue-
a detailed description of the bug or suggestion It would be nice if specific plugins’ output could be omitted from xunit2 report, for instance via include/exclude params in pytest.ini. In this particular case I’m filtering out
testcase
s withname="PYTEST"
, because it’s reporting source files as test (and mostly skips when unchanged). -
output of
pip list
from the virtual environment you are using
Django==2.2.12
pylint==2.5.0
pytest==5.4.1
pytest-cov==2.8.1
pytest-django==3.9.0
pytest-pylint==0.16.1
-
pytest and operating system versions For pytest, see versions above from pip Windows 10 with Python 3.6.7 & 3.7.4 Ubuntu 18.04 (on WSL) with Python 3.6.7 & 3.7.7
-
minimal example if possible Useless testcase output is providing incompatible class name and reports source files as testcases
<testcase classname="manage../c/path/to/repo/source/manage.py" name="PYLINT" time="0.001">
<skipped message="file(s) previously passed pylint checks" type="pytest.skip">
~/.virtualenvs/app367/lib/python3.6/site-packages/pytest_pylint/plugin.py:319: file(s) previously passed pylint checks
</skipped>
</testcase>
<testcase classname="app.admin./c/path/to/repo/source/app/admin.py" name="PYLINT" time="0.007"></testcase>
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How do I skip specific tests in xUnit based on current platform
What I do want however, is to apply an ignore to those tests, and have the fact that the test was ignored flagged...
Read more >xunit2 format does not contain a root <testsuites> tag #5477
The main thing I find missing in the currently output XML is that the top-level testsuites (plural!) tag is missing. The Schema allows...
Read more >Exclude plugin if certain platform - Unity Forum
Hi Uniteers, We have implemented Voxelbusters Lite into our project, but the plugin isn't supported for Windows Phone and outputs compile ...
Read more >Exclude Plugins from JS Minify/Combine - WordPress.org
I'm trying to exclude a specific plugin (Real Cookie Banner) from being combined into the Asset Cleanup JS file, as it causes conflicts...
Read more >pytest Documentation - Read the Docs
To disable loading specific plugins at invocation time, use the -p ... you can run the test module and get the custom output...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry if I was not clear, I understood the use case, I was wondering what the option would look like.
For example something like this?
@RonnyPfannschmidt I’m inclined to agree with you, but that would suggest not having pytest-pylint at all?
The settings for unittest / coverage (pytest-cov) / linter (pytest-pylint) all go in pytest.ini. I can’t run pytest for different use cases (tests/coverage, linting) from a single pytest.ini file (they inherit addopts anyway). In my pipeline I import the pytest output in Sonar with SonarPython, which has deprecated running pylint itself.
@nicoddemus that option also sounds fine, it is indeed more particular to the xunit output So then it would be
junit_ignore_casename_glob
/--junit-ignore-casename-glob=XYZ
andjunit_ignore_casename
/--junit-ignore-casename=XYZ