icecube / pisa

Monte Carlo-based data analysis
http://icecube.github.io/pisa/
Apache License 2.0
19 stars 47 forks source link

Fixes to make unit tests run without failure #668

Closed atrettin closed 3 years ago

atrettin commented 3 years ago

This PR adds __deepcopy__ to MapSet that manually creates a new MapSet objects with deep copies of all maps therein. The unit test checks that the copy and the original are identical and that the copy and the original really are decoupled.

This avoids the crash of the unit test when attempting to deep-copy a MapSet.

atrettin commented 3 years ago

Converted to draft to add more fixes.

philippeller commented 3 years ago

first fix look good to go I'll wait for what else is to come....

atrettin commented 3 years ago

Okay that was already it it should now work. I don't quite understand why it was necessary myself but import * did not find the one function?

atrettin commented 3 years ago

Okaaaay it looks like our unit tests were completely meaningless the entire time because even an AssertionError would not let the script exit with a failure code that GitHub recognizes. 😅

atrettin commented 3 years ago

The exit code has to be some thing other than zero for the action to be considered failed. TIL.

atrettin commented 3 years ago

Tadaa! We now have meaningful unit tests and they don't fail! 🎉 There are still tons of warnings for example that the "target" keyword is deprecated in numba but that's not critical right now.

philippeller commented 3 years ago

Thanks @atrettin for looking into this and fixing multiple things on the way! I browsed through the changes, and they look good to me, so i will merge this