Opened 11 months ago
Closed 10 months ago
#26808 closed defect (fixed)
fix bug in RandomChordalGraph
Reported by: | dcoudert | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | sage-8.5 |
Component: | graph theory | Keywords: | |
Cc: | tscrim, chapoton | Merged in: | |
Authors: | David Coudert | Reviewers: | Frédéric Chapoton |
Report Upstream: | N/A | Work issues: | |
Branch: | ccb2030 (Commits) | Commit: | ccb2030b071d485f4054ad7fd7e2909e82c9311b |
Dependencies: | Stopgaps: |
Description
Error raised in #26730#comment:32. It occurs randomly.
sage: from sage.graphs.generators.random import connecting_nodes sage: T = graphs.RandomTree(10) sage: while True: ....: S = connecting_nodes(T, 5) ....: --------------------------------------------------------------------------- UnboundLocalError Traceback (most recent call last) <ipython-input-32-396131f7c478> in <module>() 1 while True: ----> 2 S = connecting_nodes(T, Integer(5)) 3 /Users/dcoudert/sage/local/lib/python2.7/site-packages/sage/graphs/generators/random.pyc in connecting_nodes(T, l) 971 Ti = frozenset(Vi) 972 --> 973 S.append(Ti) 974 975 return S UnboundLocalError: local variable 'Ti' referenced before assignment
Change History (6)
comment:1 Changed 11 months ago by
- Branch set to public/26808_fix_bug_in_randomchordalgraph
- Cc tscrim chapoton added
- Commit set to ccb2030b071d485f4054ad7fd7e2909e82c9311b
- Status changed from new to needs_review
comment:2 Changed 11 months ago by
- Priority changed from major to critical
- Status changed from needs_review to positive_review
ok
set to critical as this gives random doctest failures
comment:3 Changed 11 months ago by
Reviewer name
comment:4 Changed 11 months ago by
- Status changed from positive_review to needs_work
comment:5 Changed 11 months ago by
- Reviewers set to Frédéric Chapoton
- Status changed from needs_work to positive_review
comment:6 Changed 10 months ago by
- Branch changed from public/26808_fix_bug_in_randomchordalgraph to ccb2030b071d485f4054ad7fd7e2909e82c9311b
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
It's easy to fix the bug. However, I don't know how to make an appropriate doctest to show that this bug is fixed. Any suggestion ?
New commits:
trac #26808: fix bug