Skip to content

Conversation

@cbentejac
Copy link
Contributor

Description

This pull request adds comprehensive tests for plugin configuration loading and environment variable handling in the plugin system. It introduces a new test class for verifying how plugin configuration files and environment variables interact, and adds a utility context manager to simplify plugin registration and cleanup during tests.

New plugin configuration tests:

  • Added TestPluginsConfiguration class in tests/test_plugins.py with tests to verify that plugin configuration files are loaded correctly, and that environment variables override or coexist with config file values as expected. The tests cover scenarios with all, some, or none of the relevant environment variables set.

Test utilities:

  • Introduced registeredPlugins context manager in tests/utils.py to handle loading and cleanup of plugins from a test folder, streamlining the setup and teardown of plugin-related tests.
  • Updated imports in tests/test_plugins.py and tests/utils.py to use the new registeredPlugins utility and ensure necessary modules are available. [1] [2]

This comment was marked as outdated.

@cbentejac cbentejac force-pushed the tests/configPlugins branch from d5b0ee1 to 51a614a Compare August 26, 2025 15:50
@codecov
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.04%. Comparing base (5dda2ac) to head (4a2f540).
⚠️ Report is 118 commits behind head on develop.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2866      +/-   ##
===========================================
+ Coverage    77.46%   78.04%   +0.58%     
===========================================
  Files           48       48              
  Lines         6735     6809      +74     
===========================================
+ Hits          5217     5314      +97     
+ Misses        1518     1495      -23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cbentejac cbentejac force-pushed the tests/configPlugins branch from 51a614a to 35ac4f0 Compare August 26, 2025 15:53
@cbentejac cbentejac requested a review from Copilot August 26, 2025 15:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request enhances test coverage for the plugin system by adding comprehensive tests for plugin configuration loading and environment variable handling. It introduces a new test class to verify plugin configuration behavior and provides test utilities to simplify plugin testing.

  • Added TestPluginsConfiguration class with tests covering configuration file loading and environment variable interactions
  • Introduced registeredPlugins context manager for streamlined plugin setup/teardown in tests
  • Created test configuration file to support plugin configuration testing scenarios

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
tests/utils.py Added registeredPlugins context manager and necessary imports for plugin testing utilities
tests/test_plugins.py Added comprehensive plugin configuration tests and updated imports to use new utilities
tests/plugins/meshroom/config.json Created test configuration file with sample plugin configuration data

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@fabiencastan fabiencastan merged commit 36ace46 into develop Sep 19, 2025
5 checks passed
@fabiencastan fabiencastan deleted the tests/configPlugins branch September 19, 2025 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants