Skip to content

Add test for plugin discovery#9

Open
RomainGehrig wants to merge 2 commits intomainfrom
claude/test-plugin-discovery-011CV1hLgaNbnSQtuPfV8Bsp
Open

Add test for plugin discovery#9
RomainGehrig wants to merge 2 commits intomainfrom
claude/test-plugin-discovery-011CV1hLgaNbnSQtuPfV8Bsp

Conversation

@RomainGehrig
Copy link
Member

This test verifies that a new plugin (like the one in examples/basic) is properly picked up by the launcher when installed. The test:

  • Installs the example plugin in editable mode
  • Discovers it via the PluginLoader
  • Verifies that commands and processes are correctly registered
  • Cleans up by uninstalling the plugin after the test

The test handles Python import caching issues by:

  • Adding the plugin path to sys.path for editable installs
  • Invalidating import caches
  • Using distributions() to force fresh entry point discovery

This test verifies that a new plugin (like the one in examples/basic)
is properly picked up by the launcher when installed. The test:

- Installs the example plugin in editable mode
- Discovers it via the PluginLoader
- Verifies that commands and processes are correctly registered
- Cleans up by uninstalling the plugin after the test

The test handles Python import caching issues by:
- Adding the plugin path to sys.path for editable installs
- Invalidating import caches
- Using distributions() to force fresh entry point discovery
- Pin Poetry to version 1.8.3 to avoid installation failures with 2.2.1
- Update actions/checkout from v3 to v4
- Update actions/setup-python from v4 to v5
- Add Python 3.11 to the test matrix

This fixes the Poetry installation error in PR #9 and ensures tests
run across Python 3.8, 3.9, 3.10, and 3.11.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants