testing: monkeypatch over settings.REPO_ROOT instead of over-writing (Bug 2031725)#1090
Closed
cgsheeh wants to merge 1 commit intomozilla-conduit:mainfrom
Closed
testing: monkeypatch over settings.REPO_ROOT instead of over-writing (Bug 2031725)#1090cgsheeh wants to merge 1 commit intomozilla-conduit:mainfrom
settings.REPO_ROOT instead of over-writing (Bug 2031725)#1090cgsheeh wants to merge 1 commit intomozilla-conduit:mainfrom
Conversation
…g (Bug 2031725) We previously overwrote the `settings.REPO_ROOT` variable in `test__models__Repo__pulse_routing_key_validator`, which would then cause failures in `test__models__Repo__system_path_validator`, since the variable we used at test collection time. Instead, `monkeypatch` over the variable in the Pulse test to avoid polluting other tests. Also create the path variable inside the test, instead of at module collection time, to avoid regressing this issue in the future.
|
View this pull request in Lando to land it once approved. |
Member
👍🏼 😬 👍🏼 |
shtrom
approved these changes
Apr 16, 2026
lando-worker bot
pushed a commit
that referenced
this pull request
Apr 16, 2026
…g (Bug 2031725) r=shtrom We previously overwrote the `settings.REPO_ROOT` variable in `test__models__Repo__pulse_routing_key_validator`, which would then cause failures in `test__models__Repo__system_path_validator`, since the variable we used at test collection time. Instead, `monkeypatch` over the variable in the Pulse test to avoid polluting other tests. Also create the path variable inside the test, instead of at module collection time, to avoid regressing this issue in the future. Pull request: #1090
|
Pull request closed by commit 7d952ae |
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.
We previously overwrote the
settings.REPO_ROOTvariable intest__models__Repo__pulse_routing_key_validator, which wouldthen cause failures in
test__models__Repo__system_path_validator,since the variable we used at test collection time.
Instead,
monkeypatchover the variable in the Pulse test toavoid polluting other tests. Also create the path variable inside
the test, instead of at module collection time, to avoid regressing
this issue in the future.