Closed colinricardo closed 7 years ago
Sorry, I didn't see this--it sounds like what you mean by should be accepted is that they produce the same result. So, if possible, it seems like you should check the result. If not possible for some reason, test_or
sounds right, but let me know if there's a case I didn't think about!
Thanks! It seems that check_result()
doesn't deem them equal because of rounding differences so test_or()
might be easiest:
select avg(duration) / 60.0
from films
gives 1.7991321897073663
select avg(duration / 60.0)
from films
gives 1.79913218970736629689
Ah, thanks for clarifying! It seems like adding a tolerance parameter to test_column should do the trick.
For example:
AVG(duration) / 60
andAVG(duration / 60)
should both be accepted.Is the best way to do this using
test_or()
withtest_student_typed()
?