-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase test coverage to 100% #9
Comments
See also https://coveralls.io/github/ProjectQ-Framework/FermiLib?branch=develop - our badge will update to 99%. |
Thanks for the new tests. It would be nice to get over 99.5% so the badge will show 100% ;-) Also, currently we are reporting test coverage for unit tests and integration tests together. The functional tests inside I could remove the functional tests from counting towards tests coverage. What do people think? (It would still run them and report failures) |
Hi Damian, 100% is an excellent goal, and one I'd like to achieve prior to our post-alpha launch. Ian is certainly being very helpful towards that goal! I understand where you are coming from with wanting us to cover the code with just unit tests but unfortunately there are parts of the code that would be very, very challenging (and/or tedious) to write meaningful unit tests for (as opposed to integration tests). A good example of this is the code which computes a molecular active space. Without being able to generate molecular Hamiltonians in the first place, one would need to contrive an example and work it out by hand to show this code works. It could be done but it would be very tedious and error prone. By contrast, by using real molecular Hamiltonians we can easily confirm that the right thing is happening. So at this point, I think it should be okay to allow the integration tests to cover certain parts of the code. That is my vote anyways but I am open to other people's opinions. I might add that I don't see this (use of integration instead of unit tests in new code) being abused much, if at all. |
We should aim for 100% test coverage. Coveralls reveals which modules have the least coverage; those with the least coverage, such as molecular_data should be improved first.
The text was updated successfully, but these errors were encountered: