Skip to content

[TESTS] Add global random seed for deterministic test#23

Merged
FrankD412 merged 2 commits into
FrankD412:mainfrom
Stephen0512:main
Jan 31, 2026
Merged

[TESTS] Add global random seed for deterministic test#23
FrankD412 merged 2 commits into
FrankD412:mainfrom
Stephen0512:main

Conversation

@Stephen0512
Copy link
Copy Markdown
Contributor

Description

This PR sets a fixed global random seed for each pytest session to make tests deterministic and easier to debug.

Motivation

Some tests rely on randomness without an explicit seed, which can lead to non-deterministic behavior and make failures harder to reproduce, especially in CI environments.

Change

A global random seed is initialized at the start of each pytest session to ensure consistent behavior across test runs.

Benefits

  • Reproducible test results
  • Easier debugging of failures
  • More consistent CI behavior

The issue was identified during an ongoing research project.

FrankD412
FrankD412 previously approved these changes Jan 24, 2026
Copy link
Copy Markdown
Owner

@FrankD412 FrankD412 left a comment

Choose a reason for hiding this comment

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

@Stephen0512 -- thanks for the contribution! This started a while ago as a personal project, didn't know expect anyone to find it/use it! ☺️

@FrankD412
Copy link
Copy Markdown
Owner

Looks like I'll have to fix the CI -- I have local changes from forever ago it seems. I'll get it all working and throw up a PR soon. Sorry about that!

@FrankD412
Copy link
Copy Markdown
Owner

FrankD412 commented Jan 25, 2026

@Stephen0512 -- I've merged #24 to handle packaging. It looks like my prior Python versioning was out of date since I haven't been developing much against this. I've set the minimum version to 3.10, but feel free to add versions if you need them.

Once you rebase your pipelines should work. :)

@FrankD412
Copy link
Copy Markdown
Owner

@Stephen0512 -- I rebased your branch as a heads up.

@FrankD412 FrankD412 merged commit d193abb into FrankD412:main Jan 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants