2020-09-16 07:41:53 +00:00
|
|
|
"""Test that metadata module matches pyproject"""
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
import toml
|
|
|
|
|
|
|
|
from imagemonk import __about__
|
|
|
|
|
|
|
|
|
|
|
|
def test_about():
|
|
|
|
"""Test metadata values"""
|
|
|
|
|
2020-12-22 02:51:20 +00:00
|
|
|
with (Path(__file__).resolve().parent.parent / "pyproject.toml").open() as infile:
|
|
|
|
pyproject = toml.load(infile)
|
2020-09-16 07:41:53 +00:00
|
|
|
|
2020-12-22 02:51:20 +00:00
|
|
|
assert pyproject["tool"]["poetry"]["name"] == __about__.__title__
|
|
|
|
assert pyproject["tool"]["poetry"]["version"] == __about__.__version__
|
|
|
|
assert pyproject["tool"]["poetry"]["license"] == __about__.__license__
|
|
|
|
assert pyproject["tool"]["poetry"]["description"] == __about__.__summary__
|
|
|
|
assert pyproject["tool"]["poetry"]["repository"] == __about__.__url__
|
|
|
|
assert (
|
|
|
|
all(
|
|
|
|
item in __about__.__authors__
|
|
|
|
for item in pyproject["tool"]["poetry"]["authors"]
|
|
|
|
)
|
|
|
|
is True
|
2020-09-16 07:41:53 +00:00
|
|
|
)
|
2020-12-22 02:51:20 +00:00
|
|
|
assert (
|
|
|
|
all(
|
|
|
|
item in pyproject["tool"]["poetry"]["authors"]
|
|
|
|
for item in __about__.__authors__
|
|
|
|
)
|
|
|
|
is True
|
2020-09-16 07:41:53 +00:00
|
|
|
)
|