Skip to content

Remove test order dependency using context managers#120

Merged
Schefflera-Arboricola merged 4 commits intonetworkx:mainfrom
akshitasure12:fix-for-issue-115
Jun 24, 2025
Merged

Remove test order dependency using context managers#120
Schefflera-Arboricola merged 4 commits intonetworkx:mainfrom
akshitasure12:fix-for-issue-115

Conversation

@akshitasure12
Copy link
Contributor

Handles #115

  • Replaced manual config resets with context managers to isolate config changes.
  • Removed pytest.mark.order decorator from test_get_n_jobs() and test_config_init() since test order is no longer needed.

Copy link
Member

@dschult dschult left a comment

Choose a reason for hiding this comment

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

This looks like a straightforward simplification to tests.
It takes advantage of context managers for setting of config variables.

Tests are passing. Looks right.

@Schefflera-Arboricola Schefflera-Arboricola merged commit 49816e1 into networkx:main Jun 24, 2025
8 checks passed
@Schefflera-Arboricola Schefflera-Arboricola added this to the 0.4 milestone Jun 24, 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.

Use context manager in tests instead of modifying the global configurations

3 participants