Closed
Description
In #4321 I've noted that our slowest tests are all instances of test_language_package
.
While we figure out the best way to improve performance for those, I do think it would be good right now to accept that those are long tests and move them accordingly so they only run if long tests are enabled. This should be doable by a beginner but it may take some reading to understand how pytest parameterization and skipping work.
Step by step instructions:
- open up
test/test_language_scanner.py
and look at the functiontest_language_package
- This is a parameterized set of tests, so you can't just use pytest.skipif directly. Take a look at how I skipped tests in https://github.com/intel/cve-bin-tool/pull/4319/files (it's at the bottom of that diff, the changes in test_scanner.py)
- figure out how to change the parameters in
test_language_package
to achieve the same effect and do it! - don't forget to run
black test/test_language_scanner.py
to make sure you're style compliant. It'll also let you know if there's a syntax error - double-check your changes by trying to run
pytest -k test_language_package
on your local machine. If you get a bunch ofsss
notes showing skipped tests, you did it! (If you get a bunch of...
and the tests run, then try again)