Code review comment for lp:~julian-edwards/gwacl/fix-block-lengths

Raphaƫl Badin (rvb) wrote :

> The problem with things like that is that you could modify the private
> variable and no test would fail. Now some may consider that good, but
> personally I start to feel suspicious and would end up poking around to work
> out why. I'd much rather have tests that test outcomes entirely independently
> of internal code parameters.

I understand your position but I still like the internal parameter solution. Now your tests test two different things: the behavior *and* the size of the implicit internal parameter. If you want to be thorough, I would suggest having 2 tests: one that would test the behavior (and that one would use the internal parameter) and another one that would test the size of the padding.

Now I agree that this might be a bit overkill in this precise situation.

« Back to merge proposal