1
0
mirror of https://github.com/pypiserver/pypiserver synced 2024-11-09 16:45:51 +01:00
pypiserver/tests/test_docs.py
PelleK d886bc2eba
Cleanup code to python 3.6 (#342)
* Cleanup setup.py

* remove explicit inheritance from object

* convert most string interpolations to f-strings

Co-authored-by: Pelle Koster <pelle.koster@nginfra.nl>
2020-10-07 20:45:51 -05:00

18 lines
459 B
Python

#! /usr/bin/env py.test
from pathlib import Path
import pytest
import re
from pypiserver import version as my_ver
@pytest.fixture()
def readme():
return Path(__file__).parents[1].joinpath("README.rst").read_text()
def test_READMEversion(readme):
m = re.compile(r"^\s*:Version:\s*(.+)\s*$", re.MULTILINE).search(readme)
assert m, "Could not find version on README!"
assert m.group(1) == my_ver, f"Updated version({m.group(1)}) on README!"