9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
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
|
|
|
|
|
|
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import pytest
import pluginconf
@pytest.fixture
def pmd():
return pluginconf.plugin_meta(fn=__file__)
def type_from_dict(pmd):
assert pmd["type"] == "test"
def version_as_prop(pmd):
assert pmd.version == "0.1-rc1"
def title_text(pmd):
assert pmd.title == "basic PMD"
def doc_field(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
|