Chris Barker <python...@gmail.com> added the comment: Yes -- it was on me years ago to do this.
Honestly, I haven't done it yet because I lost the momentum of PyCon, and I don't personally use unittest at all anyway. But I still think it's a good idea, and I'd like to keep it open with the understanding that if I don't get it done soon, it'll be closed (or someone else is welcome to do it, of course, if they want) is, say, three weeks soon enough? @Vedran Čačić wrote: "... and in the moment that you're deciding on this, you have the exact value expected right in front of you." Well, yes and no. First of all, not always a literal, though yes, most often it is. But: 1) If the "correct" value is, e.g. 1.2345678e23 -- the delta is not exactly "right there in front of you" -- yes, not that hard to figure out, but it takes a bit of thought, compared to "I want it to be close to this number within about 6 decimal places" (rel_tol=1e-6) 2) Sometimes you have a bunch of values that you are looping over in your tests, or doing parameterized tests -- it which case the relative tolerance could be constant, but the delta is not. 3) With that argument, why do we have the "decimal places" tolerance, rather than a delta always? Anyway, if I didn't consistently use pytest, I'd want this, so I'm happy to get it done. Thanks for the ping, @Irit Katriel ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue27198> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com