DataValues / Geo

Small library for parsing and formatting geographical coordinates
https://entropywins.wtf
Other
16 stars 10 forks source link

Compare precisions using assertEqualsWithDelta() #216

Closed lucaswerkmeister closed 2 years ago

lucaswerkmeister commented 2 years ago

Two-part pull request: the first commit fixes CI (errors witnessed in #215), the second commit makes a similar change in a few places where it’s not actually needed. I’m on the fence whether I like the second commit or not; it’s more consistent, but arguably also kinda weird.

Note that, in any case, there are still other floats we’re comparing with assertSame(), namely latitude and longitude. I don’t think those need to be changed.

What do you think? I’d say this can either be squash-merged, or the second commit can be discarded if we want to keep using assertSame() for those tests.

lucaswerkmeister commented 2 years ago

Eh, I think I’m now leaning towards discarding the second commit, and using assertEqualsWithDelta() only where necessary.

lucaswerkmeister commented 2 years ago

Alright, force-pushed to only use the first commit.