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.

classification
Title: test_graphlib.py depends on iteration order of sets
Type: Stage: resolved
Components: Tests Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Carl.Friedrich.Bolz, lukasz.langa, miss-islington
Priority: normal Keywords: patch

Created on 2021-10-27 11:03 by Carl.Friedrich.Bolz, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 29233 merged Carl.Friedrich.Bolz, 2021-10-27 11:18
PR 29292 merged miss-islington, 2021-10-28 20:01
PR 29293 merged miss-islington, 2021-10-28 20:02
Messages (6)
msg405084 - (view) Author: Carl Friedrich Bolz-Tereick (Carl.Friedrich.Bolz) * Date: 2021-10-27 11:03
test_graphlib fails on PyPy because it depends on the iteration order of sets. Will open a PR soon.
msg405085 - (view) Author: Carl Friedrich Bolz-Tereick (Carl.Friedrich.Bolz) * Date: 2021-10-27 11:04
here's the traceback running on pypy3.9-alpha:

======================================================================
FAIL: test_simple_cases (test.test_graphlib.TestTopologicalSort)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/cfbolz/projects/small-commits-pypy/lib-python/3/test/test_graphlib.py", line 39, in test_simple_cases
    [(3, 5, 7), (11, 8), (2, 10, 9)],
  File "/home/cfbolz/projects/small-commits-pypy/lib-python/3/test/test_graphlib.py", line 19, in _test_graph
    self.assertEqual(list(static_order_with_groups(ts)), list(expected))
AssertionError: Lists differ: [(3, 7, 5), (8, 11), (2, 9, 10)] != [(3, 5, 7), (11, 8), (2, 10, 9)]

First differing element 0:
(3, 7, 5)
(3, 5, 7)

- [(3, 7, 5), (8, 11), (2, 9, 10)]
+ [(3, 5, 7), (11, 8), (2, 10, 9)]
msg405252 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-10-28 20:01
New changeset 7401694807fc6b5f7b35ff73c06f4bb852e02946 by Carl Friedrich Bolz-Tereick in branch 'main':
bpo-45624: make test_graphlib not depend on the iteration order of sets (GH-29233)
https://github.com/python/cpython/commit/7401694807fc6b5f7b35ff73c06f4bb852e02946
msg405272 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-10-28 21:14
New changeset 67a1abb6aab3b3ce40eb3fdc0af73179ab436a3a by Miss Islington (bot) in branch '3.9':
bpo-45624: make test_graphlib not depend on the iteration order of sets (GH-29233) (GH-29292)
https://github.com/python/cpython/commit/67a1abb6aab3b3ce40eb3fdc0af73179ab436a3a
msg405273 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-10-28 21:15
New changeset eccb753ae6e1459dc697d5408e1082fff4f6d8f7 by Miss Islington (bot) in branch '3.10':
bpo-45624: make test_graphlib not depend on the iteration order of sets (GH-29233) (GH-29293)
https://github.com/python/cpython/commit/eccb753ae6e1459dc697d5408e1082fff4f6d8f7
msg405274 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-10-28 21:15
Thanks, Carl Friedrich! ✨ 🍰 ✨
History
Date User Action Args
2022-04-11 14:59:51adminsetgithub: 89787
2021-10-28 21:15:39lukasz.langasetstatus: open -> closed
versions: + Python 3.9, Python 3.10, Python 3.11
messages: + msg405274

components: + Tests
resolution: fixed
stage: patch review -> resolved
2021-10-28 21:15:05lukasz.langasetmessages: + msg405273
2021-10-28 21:14:45lukasz.langasetmessages: + msg405272
2021-10-28 20:02:46miss-islingtonsetpull_requests: + pull_request27556
2021-10-28 20:01:46miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request27555
2021-10-28 20:01:41lukasz.langasetnosy: + lukasz.langa
messages: + msg405252
2021-10-27 11:18:17Carl.Friedrich.Bolzsetkeywords: + patch
stage: patch review
pull_requests: + pull_request27496
2021-10-27 11:04:08Carl.Friedrich.Bolzsetmessages: + msg405085
2021-10-27 11:03:09Carl.Friedrich.Bolzcreate