The unit tests here are all indirect.  Either they check that an inequality is satisfied, or that scaling an input results in the same output.  None of them actually test that, for a given input, the function returns the correct value.  A really basic test could be to check the result for, say, `a = np.array([1, 0, 0, 0])`, `b = np.array([0, 1, 0, 0])` (or something similarly simple).  The correct result is easily worked out "by hand", or it can be compared to `0.5*entropy(a, 0.5*(a + b)) + 0.5*entropy(b, 0.5*(a + b))`.