jwilk / i18nspector

checking tool for gettext POT, PO and MO files
https://jwilk.net/software/i18nspector
MIT License
2 stars 4 forks source link

Add support for pytest #9

Closed jwilk closed 2 years ago

jwilk commented 2 years ago

Fixes #7. Slimmer alternative to @llimeht's #8. Cc: @s-t-e-v-e-n-k

This adds support for pytest, while retaining the possibility of using nose.

There's no equivalent for the PO file plugin yet, i.e. this doesn't work:

$ python3 -m pytest "tests/blackbox_tests/okay.po"

(I might steal the code for that from #8 later on.)

But running all tests works just fine, which should be good enough for distro maintainers.

And if you really need to run such a single test, you can do:

$ python3 -m pytest "tests/blackbox_tests/pytest.py::test_file::test['okay.po']"