aequitas icon indicating copy to clipboard operation
aequitas copied to clipboard

added unit testing framework

Open valmik-patel opened this issue 1 year ago • 1 comments

valmik-patel avatar Feb 20 '24 16:02 valmik-patel

@sgpjesus this is ready for review

  • I had to update the xhtml2pdf dependency version to get the preexisting tests to work
  • I also had to add fastparquet as a dependency to get the parquet loading tests working

Please test it locally before you merge the PR and let me know if you have any questions

I've added the instructions to the README.md file inside the tests folder but I'm also pasting them here

Unit Testing in Aequitas

To run unittests locally, you need to run the following commands from the base folder of the project.

The below commans only needs to be run once to give the testing script necessary permission to run

chmod +x run_tests.sh

The testing script itself can be run using the following commans

./run_tests.sh

The script will run all defined tests in a virtual environment and output the coverage report in the terminal.

valmik-patel avatar Mar 06 '24 18:03 valmik-patel

I would say to close the tests in the GenericDataset class we just need to check the fail conditions. I installed Coverage Gutters to check which lines are missing in VSCode.

sgpjesus avatar Mar 18 '24 09:03 sgpjesus

@sgpjesus I've removed the unused import and added more tests to ensure 100% coverage for GenericDataset. You can review it again now. Thanks!

valmik-patel avatar Mar 20 '24 21:03 valmik-patel