Skip to content

Commit

Permalink
Update test_pluginmanager.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pirate authored Sep 27, 2024
1 parent 9d1d833 commit ca3d0bc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions testing/test_pluginmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"""

import importlib.metadata
from typing import Any
from typing import List
from typing import Any, List, Dict

import pytest

Expand Down Expand Up @@ -138,7 +137,7 @@ def some_func(self):
def test_register_skips_pydantic_fields(he_pm: PluginManager) -> None:
class PydanticModelClass:
# stub to make object look like a pydantic model
model_fields: dict = {"some_attr": {}}
model_fields: Dict[str, bool] = {"some_attr": True}

def __pydantic_core_schema__(self): ...

Expand All @@ -147,7 +146,7 @@ def some_attr(self): ...

test_plugin = PydanticModelClass()
he_pm.register(test_plugin)
with pytest.raises(AttributeError) as excinfo:
with pytest.raises(AttributeError):
he_pm.hook.some_attr.get_hookimpls()


Expand Down

0 comments on commit ca3d0bc

Please sign in to comment.