Laurent Monin
8ee7759589
Drop PluginPriority in favor of a simple integer and add tests
...
- Only default value was used in the code
- having an enum for that is rather limiting its use
- add tests for PluginFunctions class
2024-06-11 16:13:57 +02:00
Philipp Wolfer
cc59c1df76
On plugin import error unset sys.modules again
2023-09-13 08:18:53 +02:00
Philipp Wolfer
b1afa8e121
PICARD-2354: Use MetaPathFinder to find Picard plugins
2023-09-09 16:55:34 +02:00
Laurent Monin
2f6479747d
Update headers
2022-02-07 09:41:57 +01:00
Laurent Monin
14ce07756e
Update Copyright headers, with the help of fix-headers.py script
2021-11-10 21:38:54 +01:00
Philipp Wolfer
dd80c1d078
Use set comprehension where appropriate
2021-11-07 10:08:14 +01:00
Philipp Wolfer
fb83a8e76b
Enable flake8 E265: Block comment should start with '# '
...
Most changes involve replacing non-breaking space with a simple space after the #.
2020-05-13 11:03:13 +02:00
Laurent Monin
6b5e852a60
Run fix-header on *.py
2020-02-24 10:25:09 +01:00
Laurent Monin
498c8eab1b
Add mktmpdir method to PicardTestCase, and use it more widely
2020-02-08 18:04:39 +01:00
Laurent Monin
b7389a6445
Tests: ensure temporary directories and files are removed after tests
...
- QSettings object needs special care, as file was re-created on exit
- Append a cleanup function as soon as possible to ensure temporary dirs & files are removed in any case
- prefer addCleanup() over tearDown(), keeping creation and cleanup together
2020-02-08 18:04:39 +01:00
Philipp Wolfer
2f1b6d79da
Implement proper version comparison for dev, alpha, beta and rc releases
...
The version identifier was previously compared alphabetically, which fails for e.g. "dev" < "alpha".
Implement proper version comparison by introducing a Version class (inherited from tuple).
2020-01-03 14:25:15 +01:00
Philipp Wolfer
95c3689a86
PICARD-1665: Refactoring for detecting user installed plugins
2019-12-31 17:17:54 +01:00
Laurent Monin
c4ff226bd5
Move a big part of plugin.py to new pluginmanager.py
2019-04-18 11:30:08 +02:00
Laurent Monin
e5d1279183
Add tests for PluginManager.load_plugins_from_directory()
2019-04-18 11:14:48 +02:00
Laurent Monin
2d8a1f8136
Unload plugin before each test
2019-04-18 11:14:48 +02:00
Laurent Monin
6bacf2deb4
_get_test_plugins(): Ignore __pycache__
2019-04-18 11:14:48 +02:00
Laurent Monin
7fceae05f7
Minor warnings fixes
2019-04-18 11:14:48 +02:00
Laurent Monin
51e85f6883
PluginManager.install_plugin(): assert path or plugin_name, and test it
2019-04-18 11:14:47 +02:00
Laurent Monin
ae779631c1
Actually import DummyPlugin to ensure it was properly loaded
2019-04-18 11:14:47 +02:00
Laurent Monin
dd42b5e3bd
Add tests for zipped plugin installed from picard plugins ws
2019-04-18 11:14:47 +02:00
Laurent Monin
f9cc6c1d81
packaged_module support is not really implemented
2019-04-18 11:14:47 +02:00
Laurent Monin
3634cbb99b
TestPicardPluginsInstall: get rid of useless loop
2019-04-18 11:14:47 +02:00
Laurent Monin
f6f7b58c38
Add tests for PluginManager.install_plugin()
2019-04-18 11:14:47 +02:00
Laurent Monin
76487b0b0b
Add tests for _plugin_name_from_path()
2019-04-18 11:14:47 +02:00
Laurent Monin
689fcdcc48
Drop PluginManager._api_versions, use picard.api_versions_tuple instead
...
- modify PluginManager._compatible_api_versions()
- add matching tests
2019-04-18 11:14:46 +02:00