File: test_pm_module.py

package info (click to toggle)
python-npe2 0.7.8-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 828 kB
  • sloc: python: 7,088; makefile: 19
file content (18 lines) | stat: -rw-r--r-- 593 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from npe2 import PluginManager


def test_pm_module():
    from npe2 import plugin_manager as pm

    assert pm.instance() is PluginManager.instance()

    # smoke-test checking that a few of the argument-free things work
    # they may or may-not be empty depending on other tests in this suite.
    pm.iter_widgets()
    pm.iter_sample_data()

    # make sure we have it covered.
    for k, v in vars(PluginManager).items():
        if k.startswith("_") or isinstance(v, (classmethod, property)):
            continue
        assert hasattr(pm, k), f"pm.py module is missing function {k!r}"