[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry again, all; I failed to read everything that was going on here. The test *wasn't* failing with the hypot-based version of Vec2D.__abs__ that's in the main branch; only with the "**0.5"-based version that was still in the older branches. Please ignore

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread Mark Dickinson
Mark Dickinson added the comment: Apologies; looks like I'm out of date on this. It's already using hypot, which makes it more than a little worrying that it doesn't get the right answer for `Vec2D(6, 8)`. -- ___ Python tracker

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread Mark Dickinson
Mark Dickinson added the comment: Low priority, but it may also be worth updating the implementation of `Vec2D.__abs__`. It currently looks like this: def __abs__(self): return (self[0]**2 + self[1]**2)**0.5 But would be more robust if it used hypot: def __abs__(self):

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread Petr Viktorin
Change by Petr Viktorin : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread miss-islington
miss-islington added the comment: New changeset 8e98ccc4c3fd1a12f168466422d206d814eba0f9 by Miss Islington (bot) in branch '3.9': bpo-44734: Fix floating point precision in test_turtle (GH-30910) https://github.com/python/cpython/commit/8e98ccc4c3fd1a12f168466422d206d814eba0f9 --

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread miss-islington
miss-islington added the comment: New changeset 486a4b382943ed4c965a0a36b177e8e0b083a6e5 by Miss Islington (bot) in branch '3.10': bpo-44734: Fix floating point precision in test_turtle (GH-30910) https://github.com/python/cpython/commit/486a4b382943ed4c965a0a36b177e8e0b083a6e5 --

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +29140 pull_request: https://github.com/python/cpython/pull/30961 ___ Python tracker ___

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset aa78287bc6d1c4fc07ee134642eb72db67b771a0 by Karolina Surma in branch 'main': bpo-44734: Fix floating point precision in test_turtle (GH-30910) https://github.com/python/cpython/commit/aa78287bc6d1c4fc07ee134642eb72db67b771a0 --

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +29139 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/30960 ___ Python tracker ___

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread Petr Viktorin
Petr Viktorin added the comment: > The first and last test should use assertAlmostEqual with a suitable > tolerance (the default tolerance is probably fine). The merged PR only added tolerance to the last test. On some architectures, the first test still fails. (No one is to blame -- this

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-26 Thread Karolina Surma
Change by Karolina Surma : -- nosy: +ksurma nosy_count: 4.0 -> 5.0 pull_requests: +29089 pull_request: https://github.com/python/cpython/pull/30910 ___ Python tracker ___

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks! ✨  ✨ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 7b2185b8e495daed30b50fe89f3ada0dc0129b62 by Miss Islington (bot) in branch '3.9': bpo-44734: Fix precision in turtle tests (GH-27343) (GH-27362) https://github.com/python/cpython/commit/7b2185b8e495daed30b50fe89f3ada0dc0129b62 --

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 16a174f7bac481ff6f859179b30a74d867747137 by Miss Islington (bot) in branch '3.10': bpo-44734: Fix precision in turtle tests (GH-27343) (GH-27361) https://github.com/python/cpython/commit/16a174f7bac481ff6f859179b30a74d867747137 --

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +25902 pull_request: https://github.com/python/cpython/pull/27362 ___ Python tracker ___

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +25901 pull_request: https://github.com/python/cpython/pull/27361 ___ Python tracker

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 3f135c073a53793ec68902f6b513934ddff47235 by Logan Jones in branch 'main': bpo-44734: Fix precision in turtle tests (GH-27343) https://github.com/python/cpython/commit/3f135c073a53793ec68902f6b513934ddff47235 -- nosy: +lukasz.langa

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-24 Thread Logan Jones
Change by Logan Jones : -- keywords: +patch nosy: +loganasherjones nosy_count: 1.0 -> 2.0 pull_requests: +25885 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27343 ___ Python tracker

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-24 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-24 Thread Mark Dickinson
Change by Mark Dickinson : -- type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker ___ ___

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-24 Thread Mark Dickinson
New submission from Mark Dickinson : >From the tests for Vec2D.__abs__ in the turtle module we have: def test_distance(self): vec = Vec2D(6, 8) expected = 10 self.assertEqual(abs(vec), expected) vec = Vec2D(0, 0) expected = 0