Skip to content

Commit

Permalink
Add basic test for plugins module
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
  • Loading branch information
JeanChristopheMorinPerso committed Apr 29, 2024
1 parent 4b8672f commit a2a1f9e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies = [
"importlib_metadata>=4.6 ; python_version < '3.10'",
# 1.3 introduces type hints.
"pluggy>=1.2",
"typing-extensions; python_version < '3.8'"
]

classifiers = [
Expand Down
26 changes: 26 additions & 0 deletions tests/plugins/test_plugins.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import typing

import pluggy

import rez_pip.plugins


def test_getManager():
assert isinstance(rez_pip.plugins.getManager(), pluggy.PluginManager)


def test_getHook():
assert isinstance(rez_pip.plugins.getHook(), pluggy.HookRelay)


def test_getHookImplementations():
implementations = rez_pip.plugins._getHookImplementations()
assert implementations == {
"rez_pip.PySide6": [
"cleanup",
"groupPackages",
"postPipResolve",
"prePipResolve",
],
"rez_pip.shiboken6": ["cleanup"],
}

0 comments on commit a2a1f9e

Please sign in to comment.