Refactor functions to avoid patching/monkeypatching environment variables when testing.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5
- Forks
- 3
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 8
Description
The code in configure_process/configure_process.py has been rewritten to be more testable and avoid the need to patch/monkeypatch environment variables.
The tests in configure_for/update_recipe.py and configure_standardise/create_request_file.py should be refactored to follow this logic.
The accompanying tests should then be similarly refactored so all uses of monkeypatch.setenv can be removed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the rewritten configure_process.py logic with the tests in update_recipe.py and create_request_file.py. Refactor those tests to use the new logic without patching environment variables, then update the accompanying tests so all monkeypatch.setenv uses are removed and the tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100