fix: resolve failing plugin architecture tests
Fixed 2 critical test failures in the plugin architecture implementation:
1. **test_processor_plugin_with_options**: Corrected test expectation for operation order
- Fixed assertion: "hello" → uppercase → "HELLO" → reverse → "OLLEH" (not "OLLAH")
- Ensures processor plugins apply options in logical sequence
2. **test_end_to_end_plugin_workflow**: Enhanced plugin configuration handling
- Fixed plugin to check both kwargs and constructor config: `kwargs.get('prefix', self.config.get('prefix', ''))`
- Ensures plugins can use configuration from both sources with proper precedence
Both fixes ensure core plugin functionality works correctly:
- Plugin option processing follows expected order of operations
- Plugin configuration is properly accessible and functional
- End-to-end plugin workflow with configuration passing works as designed
All 31 plugin architecture tests now pass, validating the complete plugin system implementation.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b0de32d083
commit
c4a1b3cc0c
1 changed files with 2 additions and 2 deletions
|
|
@ -205,7 +205,7 @@ class TestProcessorPlugin:
|
|||
|
||||
# Test with both options
|
||||
result = processor.process("hello", uppercase=True, reverse=True)
|
||||
assert result == "OLLAH"
|
||||
assert result == "OLLEH"
|
||||
|
||||
|
||||
class TestFormatterPlugin:
|
||||
|
|
@ -768,7 +768,7 @@ class TestPluginIntegration:
|
|||
)
|
||||
|
||||
def process(self, content, **kwargs):
|
||||
prefix = kwargs.get('prefix', '')
|
||||
prefix = kwargs.get('prefix', self.config.get('prefix', ''))
|
||||
return f"{prefix}{content}"
|
||||
|
||||
# 2. Verify registration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue