Skip to content

Minor follow-up to gh-8002 tests - #8016

Merged
MridulS merged 3 commits into
networkx:mainfrom
rossbar:gh-8002-followup
May 2, 2025
Merged

MridulS merged 3 commits into
networkx:mainfrom
rossbar:gh-8002-followup

Conversation

@rossbar

@rossbar rossbar commented May 1, 2025

Copy link
Copy Markdown
Contributor

I was late reviewing #8002 (apologies!) but did eventually get a chance to look at it and just turned my comments into a PR :). Not at all important, just a minor followup!

There are two main proposals:

  • 98d5074 refactors the test added in Added "initial_node" param to generate_random_paths() to allow a starting node to be specified for generated walks #8002 to check properties of the generated paths (i.e. that they all start with source, rather than doing an exact-match on a seeded example. IMO this is a minor improvement as it's slightly more flexible and removes the dependence of the test on the random number system (in principle also increasing robustness). It's clear that the test was inspired by the one below it, so it made perfect sense but I thought it was a nice opportunity to add some flexibility!
  • 558f4d2 adds an additional test for when the source is not in G.

@amcandio amcandio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MridulS
MridulS merged commit 99b9444 into networkx:main May 2, 2025
@jarrodmillman jarrodmillman added this to the 3.5 milestone May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants