Closed alonbl closed 6 months ago
Resolved all in #1141 the only left test to handle is tests/rule_doc/test_rule_doc.py
but at least parallel is working now.
Finished with tests/rule_doc/test_rule_doc.py
as ci failed parallel tests, I hope I got this correctly.
This is a side track of #1141, keeping this here so we do not forget, should be attended after merge of tox build.
Tests take along time to run, the
pytest-xdist
[1] is a nice tool that allow to run them in parallel, this reduces the time of test significantly.All you need to do is adding
pytest-xdist[psutil]
totests
dependencies inpyproject.toml
and"-n", "auto",
in[tool.pytest.ini_options]
addopts
variable.However, some tests are failing.
I suspect that this is because tests are writing files into source tree. Regardless of this issue, tests should not write anything to source tree, they should create temporary directory and write the output there, mind that the naming must be unique and there should be no conflict between tests so if you have a problem of uniqueness then a temporary directory should be created at
setUp()
There may be other issue that prevent this setup to work, I think it will be easy for you to find :)
[1] https://pytest-xdist.readthedocs.io/en/latest/