qutip / qutip-cupy

CuPy linear-algebra backend for QuTiP
BSD 3-Clause "New" or "Revised" License
18 stars 10 forks source link

Add simple tests for functions in Qobj #33

Open MrRobot2211 opened 3 years ago

MrRobot2211 commented 3 years ago

We should add some simple tests to check that everything is properly dispatched.

AGaliciaMartinez commented 3 years ago

Maybe there is a way of doing this with the tests in QuTiP. I was thinking that TestMul should assert False if the tested specialisations are not included in the proper dispatcher.

jakelishman commented 3 years ago

test_mathematics.py is meant to by unit tests that each concrete specialisation is implemented correctly. The tests of whether the dispatcher is working correctly would be somewhere else, especially because the intent is to have dispatch rules, which may mean that even an exact type match wouldn't get dispatched to the same function.