Opened 4 years ago

Closed 4 years ago

#27202 closed enhancement (fixed)

py3: fix doctests in random graphs generators

Reported by: David Coudert Owned by:
Priority: major Milestone: sage-8.7
Component: graph theory Keywords: py3, graph
Cc: Merged in:
Authors: David Coudert Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: 2da5cec (Commits, GitHub, GitLab) Commit: 2da5cec5ff882c17921cf890f863f088eb0bce17
Dependencies: Stopgaps:

Status badges

Description

We change doctests in RandomBarabasiAlbert, RandomNewmanWattsStrogatz, RandomHolmeKim, RandomTreePowerlaw, RandomRegular and RandomShell.

Several failing doctests in py3 were marked as 32-bit or 64-bit. Instead of adding extra tags, we change the doctests to more robust once, i.e., not depending of the precise list of edges.

We also take the opportunity to clean the methods.

Change History (7)

comment:1 Changed 4 years ago by David Coudert

Branch: public/27202_random_graphs_generators
Commit: c5a8294883c9eab340352c5334aa30dd01a1130a
Status: newneeds_review

New commits:

c5a8294trac #27202: fix doctests in generators/random.py

comment:2 Changed 4 years ago by git

Commit: c5a8294883c9eab340352c5334aa30dd01a1130ab33884695e419039200f4fe46229a2c1b7750e8b

Branch pushed to git repo; I updated commit sha1. New commits:

b338846trac #27202: fix doctest in RandomBarabasiAlbert

comment:3 Changed 4 years ago by Frédéric Chapoton

at least one patchbot was not happy with

+        sage: G.degree_sequence()
+        [4, 3, 3, 2, 2, 2]

Maybe this should be removed or tagged #random ?

comment:4 Changed 4 years ago by git

Commit: b33884695e419039200f4fe46229a2c1b7750e8b2da5cec5ff882c17921cf890f863f088eb0bce17

Branch pushed to git repo; I updated commit sha1. New commits:

2da5cectrac #27202: tag a doctest # random

comment:5 Changed 4 years ago by David Coudert

I tagged it # random.

comment:6 Changed 4 years ago by Frédéric Chapoton

Reviewers: Frédéric Chapoton
Status: needs_reviewpositive_review

ok

comment:7 Changed 4 years ago by Volker Braun

Branch: public/27202_random_graphs_generators2da5cec5ff882c17921cf890f863f088eb0bce17
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.