Set optimal fixture scope for resources#46
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
The `AccountsResource` and `PotsResource` fixtures now explicitly use `function` scope to ensure test isolation. This prevents internal state, such as `_cached_accounts` or `_cached_pots`, from leaking between test cases. - Changed `accounts_resource` fixture scope to `function` in `tests/pymonzo/test_accounts.py` and removed the TODO comment. - Changed `pots_resource` fixture scope to `function` in `tests/pymonzo/test_pots.py`. Co-authored-by: pawelad <7062874+pawelad@users.noreply.github.com>
0bc6635 to
5c5a51f
Compare
Set the optimal fixture scope for
AccountsResourceandPotsResourcetofunction. This ensures each test starts with a fresh instance, avoiding side effects from internal caching of API responses. Removed the related TODO intest_accounts.py.PR created automatically by Jules for task 6090339659672356690 started by @pawelad