check tuple

This commit is contained in:
Vincent Poulailleau 2021-02-02 14:42:10 +01:00
parent 97bde75feb
commit a9082a759f
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,5 @@
#: ../Doc/library/typing.rst:19
msgid ""
"tuple"
msgstr ""
"n-uplet"

View File

@ -0,0 +1,5 @@
#: ../Doc/library/typing.rst:19
msgid ""
"tuple"
msgstr ""
"*n*-uplet"

View File

@ -13,6 +13,13 @@ def pytest_generate_tests(metafunc):
metafunc.parametrize(
"known_good_po_file", [str(file_path) for file_path in files]
)
if "known_bad_po_file" in metafunc.fixturenames:
# assume using tox (that cd into tests directory)
files = list(Path("./po_with_warnings").rglob("*.po"))
files.extend(Path("./tests/po_with_warnings").rglob("*.po"))
metafunc.parametrize(
"known_bad_po_file", [str(file_path) for file_path in files]
)
def test_no_error_no_warning(known_good_po_file):
@ -20,3 +27,9 @@ def test_no_error_no_warning(known_good_po_file):
errors, warnings = check_file(known_good_po_file)
assert not errors
assert not warnings
def test_error_or_warning(known_bad_po_file):
"""Test known to be bad files."""
errors, warnings = check_file(known_bad_po_file)
assert errors or warnings