Memory update from review of PR #19#20
Open
arcanist[bot] wants to merge 2 commits into
Open
Conversation
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.
Memory updates from PR #19
Add: Writing tests that need to mock a function imported with
from x import yin the module under test.Type:
gotchaMemory:
When testing Python code that does
from module import func(a direct-reference import), patchingmodule.funcwill NOT affect the already-imported reference. You must patch at the import site — e.g. patchnons.core.node.create_provider, notnons.utils.providers.create_provider. Alternatively, bypass provider creation entirely by patchingnode.executedirectly on each instance.Rationale:
Why this is a memory (not a convention update): This is a situational pattern that helps the agent in specific contexts, not a permanent rule for all future code.
Referenced files:
nons/core/node.py,tests/test_layer.py,tests/test_node.pyAdd: Setting up or debugging pytest configuration, especially when async tests fail with 'async def functions are not natively supported' despite asyncio_mode being set.
Type:
gotchaMemory:
In Python, a
pytest.inifile must use[pytest]as its section header. Using[tool:pytest](which is correct forsetup.cfg) causes pytest to silently ignore all configuration, includingasyncio_mode = auto. Whenpytest.iniexists, it takes precedence overpyproject.tomlfor pytest config — so a malformedpytest.iniblocks thepyproject.tomlsettings from being applied.Rationale:
Why this is a memory (not a convention update): This is a situational pattern that helps the agent in specific contexts, not a permanent rule for all future code.
Referenced files:
pytest.iniSessions:
d55fa65f-1b03-461d-a5ab-9c4ce1f31a75Merge to apply. Close to discard.