ngraymon / termfactory

Exploring a formal representation for the residual terms and/or cleaning up code of the residual equation generator
MIT License
2 stars 1 forks source link

Add test for `_write_third_eTz_einsum_python` with `suppress_empty_if_checks=False` #90

Closed ngraymon closed 2 years ago

ngraymon commented 2 years ago

Otherwise coverage isn't 100%, unfortunately we need to test the whole function at the moment because it hasn't been factorized very well.

A small test for just the collect_z_contributions function can be made to cover the if temp_z_list == []: part

but the other if temp_list == []: checks are not inside a little function wrapper and so need to be called from the top function _write_third_eTz_einsum_python

Probably best to back out the proper input here?

ngraymon commented 2 years ago

Really the actual solution is to factor out all the helper functions inside _write_third_eTz_einsum_python but in lieu of that large procedure (which I will make an issue) a simple test will have to do for now