Minor fixes, mostly in tests, in preparation for setting up automated testing for xcoll.
changed some tolerances in test_everest.py
changed an assertion in test_lossmap.py, where in the cases when ignore_crystals=False there was more elements.
made some adaptations to tests to make them pass on GPU (including excluding two in test_collimator_elements.py
changed abs to fabs where appropriate
fixed the usage of @retry() (currently the brackets are necessary even if no parameters are provided, otherwise strange things happen...)
specified extras installation for tests as for the other xsuite packages. When pip install xcoll[tests] is run, pytest and ruamel.yaml are also installed.
made tests independent from the current working directory.
Checklist
Mandatory:
[ ] I have added tests to cover my changes
[x] All the tests are passing, including my new ones
[x] I described my changes in this PR description
Optional:
[x] The code I wrote follows good style practices (see PEP 8 and PEP 20).
[ ] I have updated the docs in relation to my changes, if applicable
Description
Minor fixes, mostly in tests, in preparation for setting up automated testing for xcoll.
test_everest.py
test_lossmap.py
, where in the cases whenignore_crystals=False
there was more elements.test_collimator_elements.py
abs
tofabs
where appropriate@retry()
(currently the brackets are necessary even if no parameters are provided, otherwise strange things happen...)tests
as for the other xsuite packages. Whenpip install xcoll[tests]
is run,pytest
andruamel.yaml
are also installed.Checklist
Mandatory:
Optional: