compneurobilbao / ageml

AgeML is a Python package for Age Modelling with Machine Learning made easy.
Apache License 2.0
5 stars 1 forks source link

Standardisation of Tests #27

Open JGarciaCondado opened 5 months ago

JGarciaCondado commented 5 months ago

Currently there is no clear structure or definition of how tests should be built. This should be standardised.

For example, in the case of the Interface object there are multiple tests per each method whereas in others there are only one. One possible solution is to have one single test function per each method that tests out all possible combinations.

The naming of functions is also not clear. We should give test cases (e.g. in ages mutlisystem pytest.fixture system1 and system2 should be used) and test functions more descriptive names and even a docstring explaining what is being tested.

Another issue of standardisation is how documents are saved/removed during testing. In different parts we are using different ways of building and removing them. The current methodology sometimes causes the files to remain if the test fails.

In order to improve standardisation all strings referenced in ui.py and others should be saved in messages.py so that in testing this can be compared and so when a string is changed we don't have to change the string twice, once in the function and once in the test.

Moreover, there are many warnings that are thrown when running the tests. This should either be silenced or be dealt with in the tests.

Requirements to close the issue: