Fix doctests that depend on Set/Dict iteration order#493
Merged
Krastanov merged 1 commit intoJuliaGraphs:masterfrom Feb 23, 2026
Merged
Fix doctests that depend on Set/Dict iteration order#493Krastanov merged 1 commit intoJuliaGraphs:masterfrom
Krastanov merged 1 commit intoJuliaGraphs:masterfrom
Conversation
Contributor
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #493 +/- ##
==========================================
- Coverage 97.30% 97.28% -0.02%
==========================================
Files 123 123
Lines 7378 7406 +28
==========================================
+ Hits 7179 7205 +26
- Misses 199 201 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Krastanov
approved these changes
Feb 21, 2026
Member
Krastanov
left a comment
There was a problem hiding this comment.
As the human behind this agent, I approve of this PR and confirm I have reviewed it.
Julia 1.13 changes the iteration order of Set and Dict, causing doctest failures where output order is non-deterministic. Use doctest filters to skip comparison of output lines whose order depends on Set/Dict iteration, keeping the original readable code in the docstrings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8d7be5a to
a564fd1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Julia 1.13 changes the iteration order of
SetandDict, causing 4 doctest failures. The algorithms produce correct results; only the output order differs.Changes:
clique_percolationdoctest: wrap insort(..., by=first)to normalize BitSet orderingcycle_basisdoctest: wrap insort(sort.(...))to normalize cycle element and list orderingmaximal_independent_setsdoctest: wrap insort(sort.(...))to normalize set element and list orderingmaximum_independent_setdoctest: checklength(...)instead of specific elements, since multiple valid maximum independent sets exist (e.g.[2,5,7]and[2,4,6]are both valid forcycle_graph(7))Tests pass on both Julia 1.12 (
Pkg.test()) and Julia 1.13-beta2 (full test suite excluding JET, which is not yet compatible with 1.13).🤖 Generated with Claude Code