Closed isacdaavid closed 2 years ago
a5171af updates test_phi() inside test/test_subsystem_small_phi.py to use the new eq() directly.
test_phi()
test/test_subsystem_small_phi.py
eq()
Upon closer inspection, I don't think the rest of the tests I had already touched need similar updating. E.g.:
test/test_utils.py needs to build borderline values before calling eq() itself, and it needs to define something like EPSILON for this:
test/test_utils.py
EPSILON
def test_eq(): phi = 0.5 epsilon = 10**(-config.PRECISION) close_enough = phi - epsilon / 2 not_quite = phi - epsilon * 2 assert utils.eq(phi, close_enough) assert not utils.eq(phi, not_quite) assert not utils.eq(phi, (phi - phi))
Similar reasoning applies to the rest (testing models.cpm.general_eq(), ria(), mice(), concept()). Calling eq() directly would defeat the purpose, afaict.
models.cpm.general_eq()
ria()
mice()
concept()
a5171af updates
test_phi()
insidetest/test_subsystem_small_phi.py
to use the neweq()
directly.Upon closer inspection, I don't think the rest of the tests I had already touched need similar updating. E.g.:
test/test_utils.py
needs to build borderline values before callingeq()
itself, and it needs to define something likeEPSILON
for this:Similar reasoning applies to the rest (testing
models.cpm.general_eq()
,ria()
,mice()
,concept()
). Callingeq()
directly would defeat the purpose, afaict.