Skip to content
Snippets Groups Projects
Commit be3545eb authored by Adam J. Jackson's avatar Adam J. Jackson
Browse files

Abins: move tests into a directory to de-clutter scripts/tests

parent 11245394
No related branches found
No related tags found
No related merge requests found
...@@ -101,14 +101,12 @@ Testing ...@@ -101,14 +101,12 @@ Testing
Tests for Abins are located in a few places: Tests for Abins are located in a few places:
Algorithm tests
~~~~~~~~~~~~~~~
Unit tests Unit tests
~~~~~~~~~~ ~~~~~~~~~~
Unit tests for the AbinsModules Python library are in *scripts/test/Abins*. Unit tests for the Python AbinsModules are in *scripts/test/Abins*.
These are set up with the other unit tests (``cmake --build . --target AllTests``) These are set up with the other unit tests (``cmake --build . --target AllTests``)
and can be run by filtering for Abins (``ctest -R Abins``). and can be run by filtering for Abins (``ctest -R Abins``).
This will also run the Algorithm tests (next section).
Some of these tests load input data and check that the Some of these tests load input data and check that the
structure/vibration data has been read correctly. There is a structure/vibration data has been read correctly. There is a
...@@ -125,9 +123,17 @@ Loader and pass it to *save_ab_initio_test_data*. This takes two lines of Python ...@@ -125,9 +123,17 @@ Loader and pass it to *save_ab_initio_test_data*. This takes two lines of Python
which will write the necessary *my_new_test_data.txt* file and which will write the necessary *my_new_test_data.txt* file and
*my_new_test_atomic_displacements_data_{k}.txt* files for each phonon wavevector. *my_new_test_atomic_displacements_data_{k}.txt* files for each phonon wavevector.
Algorithm tests
~~~~~~~~~~~~~~~
Tests of the main Abins algorithm and of the advanced parameter
settings are in
*Framework/PythonInterface/test/python/plugins/algorithms*. These
mostly cover input sanity-checking, and check the consistency of
result scaling and splitting into atomic contributions.
System tests System tests
~~~~~~~~~~~~ ~~~~~~~~~~~~
System tests are defined in *Testing/SystemTests/tests/analysis/AbinsTest.py*.
These tests compare the output workspaces of Abins runs with reference Nexus files.
.. categories:: Concepts .. categories:: Concepts
# Tests for Abins INS simulation
set ( TEST_PY_FILES
AbinsAtomsDataTest.py
AbinsBroadeningTest.py
AbinsCalculateDWSingleCrystalTest.py
AbinsCalculatePowderTest.py
AbinsCalculateQToscaTest.py
AbinsCalculateSingleCrystalTest.py
AbinsCalculateSPowderTest.py
AbinsDWSingleCrystalDataTest.py
AbinsFrequencyPowderGeneratorTest.py
AbinsIOmoduleTest.py
AbinsKpointsDataTest.py
AbinsLoadCASTEPTest.py
AbinsLoadCRYSTALTest.py
AbinsLoadDMOL3Test.py
AbinsLoadGAUSSIANTest.py
AbinsPowderDataTest.py
)
pyunittest_add_test(${CMAKE_CURRENT_SOURCE_DIR} python.scripts
${TEST_PY_FILES})
set(TEST_PY_FILES set(TEST_PY_FILES
AbinsAtomsDataTest.py
AbinsCalculateDWSingleCrystalTest.py
AbinsCalculatePowderTest.py
AbinsCalculateQToscaTest.py
AbinsCalculateSingleCrystalTest.py
AbinsCalculateSPowderTest.py
AbinsDWSingleCrystalDataTest.py
AbinsFrequencyPowderGeneratorTest.py
AbinsIOmoduleTest.py
AbinsKpointsDataTest.py
AbinsLoadCASTEPTest.py
AbinsLoadCRYSTALTest.py
AbinsLoadDMOL3Test.py
AbinsLoadGAUSSIANTest.py
AbinsPowderDataTest.py
AbsorptionShapesTest.py AbsorptionShapesTest.py
ConvertToWavelengthTest.py ConvertToWavelengthTest.py
CrystalFieldMultiSiteTest.py CrystalFieldMultiSiteTest.py
...@@ -60,6 +45,7 @@ unset(PYUNITTEST_QT_API) ...@@ -60,6 +45,7 @@ unset(PYUNITTEST_QT_API)
# Additional tests # Additional tests
add_subdirectory(Abins)
add_subdirectory(directtools) add_subdirectory(directtools)
add_subdirectory(MultiPlotting) add_subdirectory(MultiPlotting)
add_subdirectory(Muon) add_subdirectory(Muon)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment