This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ChrisBarker
Recipients ChrisBarker, Pam.McANulty, berker.peksag, ezio.melotti, gregory.p.smith, iritkatriel, mark.dickinson, michael.foord, r.david.murray, rbcollins, rhettinger, veky
Date 2022-03-21.22:57:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647903425.46.0.410835311964.issue27198@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2022-03-21 22:57:05ChrisBarkersetrecipients: + ChrisBarker, rhettinger, gregory.p.smith, mark.dickinson, rbcollins, ezio.melotti, r.david.murray, michael.foord, berker.peksag, Pam.McANulty, veky, iritkatriel
2022-03-21 22:57:05ChrisBarkersetmessageid: <1647903425.46.0.410835311964.issue27198@roundup.psfhosted.org>
2022-03-21 22:57:05ChrisBarkerlinkissue27198 messages
2022-03-21 22:57:05ChrisBarkercreate