add test against manually verified po files

This commit is contained in:
Vincent Poulailleau 2019-12-02 18:32:53 +01:00
parent 64660b96b6
commit 1a4535c3e7

View File

@ -1,9 +1,18 @@
from pathlib import Path
from padpo.padpo import check_file
def test_hello():
assert True != False
def pytest_generate_tests(metafunc):
if "known_good_po_file" in metafunc.fixturenames:
# assume using tox (that cd into tests directory)
directory = Path("./po_without_warnings")
files = directory.rglob("*.po")
metafunc.parametrize(
"known_good_po_file", [str(file) for file in files]
)
def test_coverage():
check_file("/home/vincent/Documents/programmation/padpo/functions.po")
def test_coverage(known_good_po_file):
# TODO get an empty list of warnings
assert check_file(known_good_po_file) == False