mirror of
https://github.com/enpaul/kodak.git
synced 2024-11-14 10:36:55 +00:00
Ethan Paul
1c1de0c241
Add missing entries to __about__ Add missing tests/__init__ file Add missing tests to test_about Fix trailing whitespace in openapi
34 lines
998 B
Python
34 lines
998 B
Python
"""Test that metadata module matches pyproject"""
|
|
from pathlib import Path
|
|
|
|
import toml
|
|
|
|
from imagemonk import __about__
|
|
|
|
|
|
def test_about():
|
|
"""Test metadata values"""
|
|
|
|
with (Path(__file__).resolve().parent.parent / "pyproject.toml").open() as infile:
|
|
pyproject = toml.load(infile)
|
|
|
|
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
|
|
)
|
|
assert (
|
|
all(
|
|
item in pyproject["tool"]["poetry"]["authors"]
|
|
for item in __about__.__authors__
|
|
)
|
|
is True
|
|
)
|