Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail on FreeBSD #44

Closed
mekanix opened this issue Dec 20, 2019 · 8 comments
Closed

Tests fail on FreeBSD #44

mekanix opened this issue Dec 20, 2019 · 8 comments
Assignees

Comments

@mekanix
Copy link

mekanix commented Dec 20, 2019

I'm trying to write FreeBSD and I'm stuck on testing. I would be really glad if you could help me resolve this.

===>  Testing for py37-pytest-translations-2.0.0
===>   py37-pytest-translations-2.0.0 depends on package: py37-testscenarios>=0 - found
===>   py37-pytest-translations-2.0.0 depends on package: py37-fixtures>=0 - found
===>   py37-pytest-translations-2.0.0 depends on package: py37-testresources>=0 - found
===>   py37-pytest-translations-2.0.0 depends on package: py37-mock>=0 - found
===>   py37-pytest-translations-2.0.0 depends on package: py37-virtualenv>=0 - found
===>   py37-pytest-translations-2.0.0 depends on package: py37-wheel>=0 - found
===>   py37-pytest-translations-2.0.0 depends on file: /usr/local/bin/python3.7 - found
cd /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0 && /usr/bin/env PYTHONPATH=/usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/src /usr/local/bin/python3.7 -m pytest -v -rs -o addopts=
============================= test session starts ==============================
platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7
cachedir: .pytest_cache
rootdir: /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0, inifile: setup.cfg
plugins: translations-2.0.0
collecting ... collected 18 items

test_translations.py::TestMo::test_broken_file PASSED                    [  5%]
test_translations.py::TestMo::test_ok PASSED                             [ 11%]
test_translations.py::TestMo::test_missing_po PASSED                     [ 16%]
test_translations.py::TestMo::test_entry_mismatch PASSED                 [ 22%]
test_translations.py::TestPo::test_uses_argument PASSED                  [ 27%]
test_translations.py::TestPo::test_broken_file PASSED                    [ 33%]
test_translations.py::TestPo::test_valid PASSED                          [ 38%]
test_translations.py::TestPo::test_missing_translation PASSED            [ 44%]
test_translations.py::TestPo::test_fuzzy PASSED                          [ 50%]
test_translations.py::TestPo::test_obsolete PASSED                       [ 55%]
test_translations.py::TestPo::test_all PASSED                            [ 61%]
test_translations.py::TestPoSpellcheck::test_broken_file PASSED          [ 66%]
test_translations.py::TestPoSpellcheck::test_language_missing_in_po FAILED [ 72%]
test_translations.py::TestPoSpellcheck::test_language_catalog_missing FAILED [ 77%]
test_translations.py::TestPoSpellcheck::test_python_format_placeholders FAILED [ 83%]
test_translations.py::TestPoSpellcheck::test_pass FAILED                 [ 88%]
test_translations.py::TestPoSpellcheck::test_fail FAILED                 [ 94%]
test_translations.py::TestPoSpellcheck::test_wordlist FAILED             [100%]

=================================== FAILURES ===================================
_________________ TestPoSpellcheck.test_language_missing_in_po _________________

self = <test_translations.TestPoSpellcheck object at 0x803635610>
testdir = <Testdir local('/tmp/pytest-of-root/pytest-4/test_language_missing_in_po0')>

    def test_language_missing_in_po(self, testdir):
        testdir.makefile(
            'po',
            """
            #: asdf.py:111
            msgid "meeting"
            msgstr "meeeting"
            """
        )
        result = testdir.runpytest('--translations', '-vvv', '-r', 's')
        result.stdout.fnmatch_lines([
            "*collected 4*",
>           "SKIP * no language defined in PO file",
        ])
E       Failed: nomatch: '*collected 4*'
E           and: '============================= test session starts =============================='
E           and: 'platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7'
E           and: 'cachedir: .pytest_cache'
E           and: 'rootdir: /tmp/pytest-of-root/pytest-4/test_language_missing_in_po0'
E           and: 'plugins: translations-2.0.0'
E       fnmatch: '*collected 4*'
E          with: 'collecting ... collected 4 items'
E       nomatch: 'SKIP * no language defined in PO file'
E           and: ''
E           and: 'test_language_missing_in_po.po::test_language_missing_in_po.po PASSED    [ 25%]'
E           and: 'test_language_missing_in_po.po::test_language_missing_in_po.po PASSED    [ 25%]'
E           and: 'test_language_missing_in_po.po::test_language_missing_in_po.po PASSED    [ 25%]'
E           and: 'test_language_missing_in_po.po::test_language_missing_in_po.po SKIPPED   [ 25%]'
E           and: ''
E           and: '=============================== warnings summary ==============================='
E           and: '/usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324'
E           and: '  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.translations - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html'
E           and: '    PytestUnknownMarkWarning,'
E           and: ''
E           and: '-- Docs: https://docs.pytest.org/en/latest/warnings.html'
E           and: '=========================== short test summary info ============================'
E           and: 'SKIPPED [1] /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/pytest_translations/po_spelling.py:69: no language defined in PO file'
E           and: '=============== 3 passed, 1 skipped, 1 warnings in 0.01 seconds ================'
E           and: ''
E       remains unmatched: 'SKIP * no language defined in PO file'

/usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/test_translations.py:249: Failed
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7
cachedir: .pytest_cache
rootdir: /tmp/pytest-of-root/pytest-4/test_language_missing_in_po0
plugins: translations-2.0.0
collecting ... collected 4 items

test_language_missing_in_po.po::test_language_missing_in_po.po PASSED    [ 25%]
test_language_missing_in_po.po::test_language_missing_in_po.po PASSED    [ 25%]
test_language_missing_in_po.po::test_language_missing_in_po.po PASSED    [ 25%]
test_language_missing_in_po.po::test_language_missing_in_po.po SKIPPED   [ 25%]

=============================== warnings summary ===============================
/usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324
  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.translations - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=========================== short test summary info ============================
SKIPPED [1] /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/pytest_translations/po_spelling.py:69: no language defined in PO file
=============== 3 passed, 1 skipped, 1 warnings in 0.01 seconds ================
________________ TestPoSpellcheck.test_language_catalog_missing ________________

self = <test_translations.TestPoSpellcheck object at 0x803741410>
testdir = <Testdir local('/tmp/pytest-of-root/pytest-4/test_language_catalog_missing0')>

    def test_language_catalog_missing(self, testdir):
        testdir.makefile(
            'po',
            """
            msgid ""
            msgstr ""
            "Language: hr\\n"
    
            #: asdf.py:111
            msgid "meeting"
            msgstr "meeeting"
            """
        )
        result = testdir.runpytest('--translations', '-vvv', '-r', 's')
        result.stdout.fnmatch_lines([
            "*collected 4*",
>           "SKIP * aspell dictionary for language hr not found*",
        ])
E       Failed: nomatch: '*collected 4*'
E           and: '============================= test session starts =============================='
E           and: 'platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7'
E           and: 'cachedir: .pytest_cache'
E           and: 'rootdir: /tmp/pytest-of-root/pytest-4/test_language_catalog_missing0'
E           and: 'plugins: translations-2.0.0'
E       fnmatch: '*collected 4*'
E          with: 'collecting ... collected 4 items'
E       nomatch: 'SKIP * aspell dictionary for language hr not found*'
E           and: ''
E           and: 'test_language_catalog_missing.po::test_language_catalog_missing.po PASSED [ 25%]'
E           and: 'test_language_catalog_missing.po::test_language_catalog_missing.po PASSED [ 25%]'
E           and: 'test_language_catalog_missing.po::test_language_catalog_missing.po PASSED [ 25%]'
E           and: 'test_language_catalog_missing.po::test_language_catalog_missing.po SKIPPED [ 25%]'
E           and: ''
E           and: '=============================== warnings summary ==============================='
E           and: '/usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324'
E           and: '  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.translations - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html'
E           and: '    PytestUnknownMarkWarning,'
E           and: ''
E           and: '-- Docs: https://docs.pytest.org/en/latest/warnings.html'
E           and: '=========================== short test summary info ============================'
E           and: 'SKIPPED [1] /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/pytest_translations/po_spelling.py:73: aspell dictionary for language hr not found.'
E           and: '=============== 3 passed, 1 skipped, 1 warnings in 0.01 seconds ================'
E           and: ''
E       remains unmatched: 'SKIP * aspell dictionary for language hr not found*'

/usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/test_translations.py:268: Failed
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7
cachedir: .pytest_cache
rootdir: /tmp/pytest-of-root/pytest-4/test_language_catalog_missing0
plugins: translations-2.0.0
collecting ... collected 4 items

test_language_catalog_missing.po::test_language_catalog_missing.po PASSED [ 25%]
test_language_catalog_missing.po::test_language_catalog_missing.po PASSED [ 25%]
test_language_catalog_missing.po::test_language_catalog_missing.po PASSED [ 25%]
test_language_catalog_missing.po::test_language_catalog_missing.po SKIPPED [ 25%]

=============================== warnings summary ===============================
/usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324
  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.translations - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=========================== short test summary info ============================
SKIPPED [1] /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/pytest_translations/po_spelling.py:73: aspell dictionary for language hr not found.
=============== 3 passed, 1 skipped, 1 warnings in 0.01 seconds ================
_______________ TestPoSpellcheck.test_python_format_placeholders _______________

self = <test_translations.TestPoSpellcheck object at 0x8037c65d0>
testdir = <Testdir local('/tmp/pytest-of-root/pytest-4/test_python_format_placeholders0')>

    def test_python_format_placeholders(self, testdir):
        testdir.makefile(
            'po',
            """
            msgid ""
            msgstr ""
            "Language: de\\n"
    
            #: asdf.py:111
            msgid "meeting"
            msgstr "Langer Text %(salkdjfalsdjf)s {kaksjsalkas} Verabredung"
            """
        )
        result = testdir.runpytest('--translations', '-vvv', '-r', 's')
        result.stdout.fnmatch_lines([
            "*collected 4*",
>           "*4 passed*",
        ])
E       Failed: nomatch: '*collected 4*'
E           and: '============================= test session starts =============================='
E           and: 'platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7'
E           and: 'cachedir: .pytest_cache'
E           and: 'rootdir: /tmp/pytest-of-root/pytest-4/test_python_format_placeholders0'
E           and: 'plugins: translations-2.0.0'
E       fnmatch: '*collected 4*'
E          with: 'collecting ... collected 4 items'
E       nomatch: '*4 passed*'
E           and: ''
E           and: 'test_python_format_placeholders.po::test_python_format_placeholders.po PASSED [ 25%]'
E           and: 'test_python_format_placeholders.po::test_python_format_placeholders.po PASSED [ 25%]'
E           and: 'test_python_format_placeholders.po::test_python_format_placeholders.po PASSED [ 25%]'
E           and: 'test_python_format_placeholders.po::test_python_format_placeholders.po SKIPPED [ 25%]'
E           and: ''
E           and: '=============================== warnings summary ==============================='
E           and: '/usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324'
E           and: '  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.translations - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html'
E           and: '    PytestUnknownMarkWarning,'
E           and: ''
E           and: '-- Docs: https://docs.pytest.org/en/latest/warnings.html'
E           and: '=========================== short test summary info ============================'
E           and: 'SKIPPED [1] /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/pytest_translations/po_spelling.py:73: aspell dictionary for language de not found.'
E           and: '=============== 3 passed, 1 skipped, 1 warnings in 0.01 seconds ================'
E           and: ''
E       remains unmatched: '*4 passed*'

/usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/test_translations.py:287: Failed
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7
cachedir: .pytest_cache
rootdir: /tmp/pytest-of-root/pytest-4/test_python_format_placeholders0
plugins: translations-2.0.0
collecting ... collected 4 items

test_python_format_placeholders.po::test_python_format_placeholders.po PASSED [ 25%]
test_python_format_placeholders.po::test_python_format_placeholders.po PASSED [ 25%]
test_python_format_placeholders.po::test_python_format_placeholders.po PASSED [ 25%]
test_python_format_placeholders.po::test_python_format_placeholders.po SKIPPED [ 25%]

=============================== warnings summary ===============================
/usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324
  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.translations - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=========================== short test summary info ============================
SKIPPED [1] /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/pytest_translations/po_spelling.py:73: aspell dictionary for language de not found.
=============== 3 passed, 1 skipped, 1 warnings in 0.01 seconds ================
__________________________ TestPoSpellcheck.test_pass __________________________

self = <test_translations.TestPoSpellcheck object at 0x8038847d0>
testdir = <Testdir local('/tmp/pytest-of-root/pytest-4/test_pass0')>

    def test_pass(self, testdir):
        testdir.makefile(
            'po',
            """
            msgid ""
            msgstr ""
            "Language: de\\n"
    
            #: asdf.py:111
            msgid "meeting"
            msgstr "Verabredung"
            """
        )
        result = testdir.runpytest('--translations', '-vvv', '-r', 's')
        result.stdout.fnmatch_lines([
            "*collected 4*",
>           "*4 passed*",
        ])
E       Failed: nomatch: '*collected 4*'
E           and: '============================= test session starts =============================='
E           and: 'platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7'
E           and: 'cachedir: .pytest_cache'
E           and: 'rootdir: /tmp/pytest-of-root/pytest-4/test_pass0'
E           and: 'plugins: translations-2.0.0'
E       fnmatch: '*collected 4*'
E          with: 'collecting ... collected 4 items'
E       nomatch: '*4 passed*'
E           and: ''
E           and: 'test_pass.po::test_pass.po PASSED                                        [ 25%]'
E           and: 'test_pass.po::test_pass.po PASSED                                        [ 25%]'
E           and: 'test_pass.po::test_pass.po PASSED                                        [ 25%]'
E           and: 'test_pass.po::test_pass.po SKIPPED                                       [ 25%]'
E           and: ''
E           and: '=============================== warnings summary ==============================='
E           and: '/usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324'
E           and: '  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.translations - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html'
E           and: '    PytestUnknownMarkWarning,'
E           and: ''
E           and: '-- Docs: https://docs.pytest.org/en/latest/warnings.html'
E           and: '=========================== short test summary info ============================'
E           and: 'SKIPPED [1] /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/pytest_translations/po_spelling.py:73: aspell dictionary for language de not found.'
E           and: '=============== 3 passed, 1 skipped, 1 warnings in 0.01 seconds ================'
E           and: ''
E       remains unmatched: '*4 passed*'

/usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/test_translations.py:306: Failed
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7
cachedir: .pytest_cache
rootdir: /tmp/pytest-of-root/pytest-4/test_pass0
plugins: translations-2.0.0
collecting ... collected 4 items

test_pass.po::test_pass.po PASSED                                        [ 25%]
test_pass.po::test_pass.po PASSED                                        [ 25%]
test_pass.po::test_pass.po PASSED                                        [ 25%]
test_pass.po::test_pass.po SKIPPED                                       [ 25%]

=============================== warnings summary ===============================
/usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324
  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.translations - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=========================== short test summary info ============================
SKIPPED [1] /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/pytest_translations/po_spelling.py:73: aspell dictionary for language de not found.
=============== 3 passed, 1 skipped, 1 warnings in 0.01 seconds ================
__________________________ TestPoSpellcheck.test_fail __________________________

self = <test_translations.TestPoSpellcheck object at 0x8038d5ad0>
testdir = <Testdir local('/tmp/pytest-of-root/pytest-4/test_fail0')>

    def test_fail(self, testdir):
        testdir.makefile(
            'po',
            """
            msgid ""
            msgstr ""
            "Language: de\\n"
    
            #: asdf.py:111
            msgid "meeting"
            msgstr "meeeting"
            """
        )
        result = testdir.runpytest('--translations', '-vvv', '-r', 's')
        result.stdout.fnmatch_lines([
            "*collected 4*",
            '*Spell checking failed:*',
            '*msgstr "meeeting"*',
>           "*1 failed*",
        ])
E       Failed: nomatch: '*collected 4*'
E           and: '============================= test session starts =============================='
E           and: 'platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7'
E           and: 'cachedir: .pytest_cache'
E           and: 'rootdir: /tmp/pytest-of-root/pytest-4/test_fail0'
E           and: 'plugins: translations-2.0.0'
E       fnmatch: '*collected 4*'
E          with: 'collecting ... collected 4 items'
E       nomatch: '*Spell checking failed:*'
E           and: ''
E           and: 'test_fail.po::test_fail.po PASSED                                        [ 25%]'
E           and: 'test_fail.po::test_fail.po PASSED                                        [ 25%]'
E           and: 'test_fail.po::test_fail.po PASSED                                        [ 25%]'
E           and: 'test_fail.po::test_fail.po SKIPPED                                       [ 25%]'
E           and: ''
E           and: '=============================== warnings summary ==============================='
E           and: '/usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324'
E           and: '  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.translations - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html'
E           and: '    PytestUnknownMarkWarning,'
E           and: ''
E           and: '-- Docs: https://docs.pytest.org/en/latest/warnings.html'
E           and: '=========================== short test summary info ============================'
E           and: 'SKIPPED [1] /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/pytest_translations/po_spelling.py:73: aspell dictionary for language de not found.'
E           and: '=============== 3 passed, 1 skipped, 1 warnings in 0.01 seconds ================'
E           and: ''
E       remains unmatched: '*Spell checking failed:*'

/usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/test_translations.py:327: Failed
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7
cachedir: .pytest_cache
rootdir: /tmp/pytest-of-root/pytest-4/test_fail0
plugins: translations-2.0.0
collecting ... collected 4 items

test_fail.po::test_fail.po PASSED                                        [ 25%]
test_fail.po::test_fail.po PASSED                                        [ 25%]
test_fail.po::test_fail.po PASSED                                        [ 25%]
test_fail.po::test_fail.po SKIPPED                                       [ 25%]

=============================== warnings summary ===============================
/usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324
  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.translations - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=========================== short test summary info ============================
SKIPPED [1] /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/pytest_translations/po_spelling.py:73: aspell dictionary for language de not found.
=============== 3 passed, 1 skipped, 1 warnings in 0.01 seconds ================
________________________ TestPoSpellcheck.test_wordlist ________________________

self = <test_translations.TestPoSpellcheck object at 0x8039c0290>
testdir = <Testdir local('/tmp/pytest-of-root/pytest-4/test_wordlist0')>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x8039c0890>

    def test_wordlist(self, testdir, monkeypatch):
        testdir.makefile(
            'po',
            """
            msgid ""
            msgstr ""
            "Language: de\\n"
    
            #: asdf.py:111
            msgid "meeting"
            msgstr "meeeting"
            """
        )
    
        test_dir = str(testdir.tmpdir.dirpath())
        wordlist_de = os.path.join(test_dir, 'de')
        assert not os.path.exists(wordlist_de)
    
        with open(wordlist_de, 'w+') as wl:
            wl.write("meeeting\n")
    
        monkeypatch.setenv('PYTEST_TRANSLATIONS_PRIVATE_WORD_LIST', test_dir)
    
        assert os.path.exists(wordlist_de)
    
        result = testdir.runpytest('--translations', '-vvv')
        result.stdout.fnmatch_lines([
            "*collected 4*",
>           "*4 passed*",
        ])
E       Failed: nomatch: '*collected 4*'
E           and: '============================= test session starts =============================='
E           and: 'platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7'
E           and: 'cachedir: .pytest_cache'
E           and: 'rootdir: /tmp/pytest-of-root/pytest-4/test_wordlist0'
E           and: 'plugins: translations-2.0.0'
E       fnmatch: '*collected 4*'
E          with: 'collecting ... collected 4 items'
E       nomatch: '*4 passed*'
E           and: ''
E           and: 'test_wordlist.po::test_wordlist.po PASSED                                [ 25%]'
E           and: 'test_wordlist.po::test_wordlist.po PASSED                                [ 25%]'
E           and: 'test_wordlist.po::test_wordlist.po PASSED                                [ 25%]'
E           and: 'test_wordlist.po::test_wordlist.po SKIPPED                               [ 25%]'
E           and: ''
E           and: '=============================== warnings summary ==============================='
E           and: '/usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324'
E           and: '  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.translations - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html'
E           and: '    PytestUnknownMarkWarning,'
E           and: ''
E           and: '-- Docs: https://docs.pytest.org/en/latest/warnings.html'
E           and: '=============== 3 passed, 1 skipped, 1 warnings in 0.01 seconds ================'
E           and: ''
E       remains unmatched: '*4 passed*'

/usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/test_translations.py:358: Failed
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform freebsd12 -- Python 3.7.5, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /usr/local/bin/python3.7
cachedir: .pytest_cache
rootdir: /tmp/pytest-of-root/pytest-4/test_wordlist0
plugins: translations-2.0.0
collecting ... collected 4 items

test_wordlist.po::test_wordlist.po PASSED                                [ 25%]
test_wordlist.po::test_wordlist.po PASSED                                [ 25%]
test_wordlist.po::test_wordlist.po PASSED                                [ 25%]
test_wordlist.po::test_wordlist.po SKIPPED                               [ 25%]

=============================== warnings summary ===============================
/usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324
  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.translations - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=============== 3 passed, 1 skipped, 1 warnings in 0.01 seconds ================
===================== 6 failed, 12 passed in 1.69 seconds ======================
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/py-pytest-translations
@amureki
Copy link
Contributor

amureki commented Jan 27, 2020

@syphar do you think, we can check it out?

@mekanix
Copy link
Author

mekanix commented Jun 15, 2021

Hello! I'd like to dig into this issue. Could you help narrowing it down initially? I mean, currently I have no clue where to start.

@syphar
Copy link
Member

syphar commented Jun 15, 2021

@mekanix thank you!

you would need to split the problem:

  1. what breaks the package for you?
  2. what breaks our tests on FreeBSD

For each failing test we do assertions on the pytest output, and we need to see what's wrong.

One thing we directly see is:

'SKIPPED [1] /usr/ports/devel/py-pytest-translations/work-py37/pytest-translations-2.0.0/pytest_translations/po_spelling.py:73: aspell dictionary for language de not found.'

Which seems to be a missing dictionary for the tests.

It would be awesome if you can add FreeBSD tests to our testing pipeline, there are perhaps some helpers you can use ( like https://github.com/marketplace/actions/freebsd-vm , but I didn't dig deeper) .

I'm aware the output-line matching is not the optimal way to test this extension, but it's all we have here :)

@mekanix
Copy link
Author

mekanix commented Jun 15, 2021

I just remembered to look, pytest version is 4.6.11. I would have to upgrade that first and get back to translations. I'll keep you posted.

As for tests, I'll have to set it up for some of my projects, now that you shared marketplace. Thank you!

@mekanix
Copy link
Author

mekanix commented Jun 15, 2021

Upgrading pytest fixed half of the failing tests while installing de-hunspell fixed the other half, as enchant is built with hunspell by default.

I have to play a little with freebsd-vm action and I'll send PR for it. Thank you!

@syphar
Copy link
Member

syphar commented Jun 15, 2021

that is awesome! 🎉

@mekanix
Copy link
Author

mekanix commented Jun 24, 2021

It's all in the ports now and Pytest is upgraded, too. I will leave this issue opened until I write CI for it, if you don't mind.

@mekanix
Copy link
Author

mekanix commented Apr 20, 2022

I am happy to report that latest version is in FreeBSD ports. All tests are now enabled and when the next build of packages is finished pytest-translations will be updated. Thank you!

@mekanix mekanix closed this as completed Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants