Opened 3 years ago

Closed 3 years ago

#26182 closed defect (fixed)

py3: fix doctests failures of sage/sets/disjoint_set.pyx

Reported by: slabbe Owned by:
Priority: minor Milestone: sage-8.4
Component: doctest coverage Keywords:
Cc: chapoton Merged in:
Authors: Sébastien Labbé Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 5b4e968 (Commits, GitHub, GitLab) Commit: 5b4e968f450c992e3cbc74832d845a4f1c6a067f
Dependencies: Stopgaps:

Status badges

Description

On https://patchbot.sagemath.org/ticket/0/ there are two failures for the file sage/sets/disjoint_set.pyx when run with Python 3:

sage -t --long src/sage/sets/disjoint_set.pyx
**********************************************************************
File "src/sage/sets/disjoint_set.pyx", line 537, in sage.sets.disjoint_set.DisjointSet_of_integers.root_to_elements_dict
Failed example:
    d.root_to_elements_dict()
Expected:
    {1: [1], 2: [0, 2, 3], 4: [4]}
Got:
    {2: [0, 2, 3], 1: [1], 4: [4]}
**********************************************************************
File "src/sage/sets/disjoint_set.pyx", line 829, in sage.sets.disjoint_set.DisjointSet_of_hashables.root_to_elements_dict
Failed example:
    e = d.root_to_elements_dict(); e
Expected:
    {0: [0], 2: [2, 3], 4: [1, 4]}
Got:
    {0: [0], 4: [1, 4], 2: [2, 3]}
**********************************************************************
2 items had failures:
   1 of   5 in sage.sets.disjoint_set.DisjointSet_of_hashables.root_to_elements_dict
   1 of   8 in sage.sets.disjoint_set.DisjointSet_of_integers.root_to_elements_dict
    [241 tests, 2 failures, 0.39 s]

Change History (3)

comment:1 Changed 3 years ago by slabbe

  • Authors set to Sébastien Labbé
  • Branch set to u/slabbe/26182
  • Commit set to 5b4e968f450c992e3cbc74832d845a4f1c6a067f
  • Status changed from new to needs_review

New commits:

5b4e96826182: fixing dict ordering issues for python 3 in doctest

comment:2 Changed 3 years ago by tscrim

  • Cc chapoton added
  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM.

comment:3 Changed 3 years ago by vbraun

  • Branch changed from u/slabbe/26182 to 5b4e968f450c992e3cbc74832d845a4f1c6a067f
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.