Artifact 268d6cd46f8018a15ce82ac086664fa0d1f1c5a5204857c9a5a4e8d9f1eff94d:


# type: test
# title: basic PMD
# description: check for some fields
# version: 0.1-rc1
# 
# This the doc.


import pytest
import pluginconf

@pytest.fixture
def pmd():
    return pluginconf.plugin_meta(fn=__file__)

def type_(pmd):
    assert pmd["type"] == "test"

def version_(pmd):
    assert pmd.version == "0.1-rc1"

def title_(pmd):
    assert pmd["title"] == "basic PMD"

def doc_(pmd):
    assert pmd["doc"] == "This the doc."

# Should probably migrate all to PluginMeta.property access
def test_all_as_props(pmd):
    for key, val in pmd.items():
        assert getattr(pmd, key) == val