Skip to content

Conversation

@KillerB-O
Copy link

Description

This change removes the legacy seeded_test fixture, which relied onnp.random.seed, and introduces a pytest rng fixture built on np.random.default_rng.

Tests that previously depended on seeded_test were updated to use the fixture-provided generator, avoiding reliance on global NumPy random state. This improves test isolation and aligns the test suite with NumPy’s recommended random number API, while preserving reproducible behavior via a fixed seed.

Summary of changes

  • Removed the seeded_test fixture from conftest.py
  • Updated tests that depended on it to use the rng fixture
  • Replaced legacy np.random.* calls in tests that depended on seeded_test with the corresponding Generator (rng.*) methods where applicable

Rationale

  • Avoids global random state in tests
  • Improves determinism and isolation
  • Aligns with modern NumPy testing practices

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

@KillerB-O
Copy link
Author

/pre-commit.ci autofix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get rid of seeded_test fixture

1 participant