fix(test): add @pytest.mark.asyncio to TestUpdateColumnAllowlist - #109
Open
github-actions[bot] wants to merge 1 commit into
Open
fix(test): add @pytest.mark.asyncio to TestUpdateColumnAllowlist#109github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
pytest-asyncio runs in STRICT mode (the [tool:pytest] asyncio_mode=auto setting in pytest.ini is not recognised by the [pytest] parser). All other async test classes in this repo (TestMigrationManager, TestRAGManager) carry the class-level @pytest.mark.asyncio decorator; the new allowlist test class was missing it, causing the four async methods to fail with "async def functions are not natively supported". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Root cause
pytest-asynciois running in STRICT mode during CI. Theasyncio_mode = autosetting inpytest.inisits under a[tool:pytest]section, which is only valid insetup.cfg—pytest.inionly recognises the[pytest]section. As a result, the setting is silently ignored and pytest-asyncio falls back to STRICT mode.In STRICT mode every
async deftest function must carry an explicit@pytest.mark.asynciodecorator (or inherit one from a class-level decorator). All other async test classes in this repo (TestMigrationManager,TestRAGManager,TestGoalsService) already follow this convention; the newTestUpdateColumnAllowlistclass introduced in PR #98 was missing the decorator.Fix
Added
@pytest.mark.asyncioat the class level intests/test_database_update_allowlist.py— identical to the pattern used by every other async test class in the project.References
Fixes failing
test-backend / Run database testsstep in CI run https://github.com/izzywdev/FuzeAgent/actions/runs/30052681664.Companion to #98.
🤖 Generated with Claude Code