-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add and fix tests for init-hook based plugin load (#7475)
* Add and fix tests for init-hook based plugin load This changes 4 existing tests, due to a misunderstanding of the author (past me) in a couple of the details of those tests. Specifically, we now copy a single python file to use as our plugin, and make sure to correctly check for the name as given in the checker classes. We also make sure not to accidentally load the old copy of the plugin, which apparently sits in a directory that is already on the system path. There is also a single new test, which covers the cases of loading a plugin with ``init-hook`` magic, both specified in an rc file, but in different orders. This should be sufficient to close the issue around #7264. Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
- Loading branch information
1 parent
b47aa30
commit e75089b
Showing
2 changed files
with
142 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Add and fix regression tests for plugin loading. | ||
|
||
This shores up the tests that cover the loading of custom plugins as affected | ||
by any changes made to the ``sys.path`` during execution of an ``init-hook``. | ||
Given the existing contract of allowing plugins to be loaded by fiddling with | ||
the path in this way, this is now the last bit of work needed to close Github | ||
issue #7264. | ||
|
||
Closes #7264 |
This file contains 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