Currently, the expected results for the tests are saved by these lines in aana/tests/utils.py. The process right now is manual uncommenting and running the tests to save the expected results. The way it is done now is not very user-friendly and error-prone.
The enhancement consists of two parts:
Adding an environment variable to enable saving the expected results. This will allow the user to run the tests and save the expected results without modifying the code.
Checking if the output is successful before saving the expected results. This will prevent the user from saving incorrect results.
Advantages
The user will be able to save the expected results without modifying the code.
More user-friendly and less error-prone.
Possible Implementation
Add an environment variable to enable saving the expected results.
Check if the output is successful before saving the expected results. Log an error, warning or raise an exception if the output is not successful.
Enhancement Description
Currently, the expected results for the tests are saved by these lines in aana/tests/utils.py. The process right now is manual uncommenting and running the tests to save the expected results. The way it is done now is not very user-friendly and error-prone.
The enhancement consists of two parts:
Advantages
Possible Implementation