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

Add tests with xfail for tracking presence of error elements #93

Merged

Conversation

jacobwegner
Copy link
Collaborator

refs #92 (comment)

Running the xfail tests tests via:

pytest -k test_no_errors --runxfail

Results in:

============================================ test session starts ============================================
platform darwin -- Python 3.10.11, pytest-7.2.2, pluggy-1.0.0
rootdir: macula-greek/test
collected 769 items / 715 deselected / 54 selected

test_nestle1904_lowfat.py ....F......................                                                 [ 50%]
test_sblgnt_lowfat.py ....FF.....................                                                     [100%]

================================================= FAILURES ==================================================
_____________________________ test_no_errors[../Nestle1904/lowfat/05-acts.xml] ______________________________

lowfat_file = '../Nestle1904/lowfat/05-acts.xml'

    @pytest.mark.xfail
    @pytest.mark.parametrize("lowfat_file", __lowfat_files__)
    def test_no_errors(lowfat_file):
        count = len(run_xpath_for_file(ERROR_EXPRESSION, lowfat_file))
>       assert count == 0
E       assert 1 == 0

test_nestle1904_lowfat.py:83: AssertionError
_______________________________ test_no_errors[../SBLGNT/lowfat/05-acts.xml] ________________________________

lowfat_file = '../SBLGNT/lowfat/05-acts.xml'

    @pytest.mark.xfail
    @pytest.mark.parametrize("lowfat_file", __sblgnt_lowfat_files__)
    def test_no_errors(lowfat_file):
        count = len(run_xpath_for_file(ERROR_EXPRESSION, lowfat_file))
>       assert count == 0
E       assert 1 == 0

test_sblgnt_lowfat.py:86: AssertionError
______________________________ test_no_errors[../SBLGNT/lowfat/06-romans.xml] _______________________________

lowfat_file = '../SBLGNT/lowfat/06-romans.xml'

    @pytest.mark.xfail
    @pytest.mark.parametrize("lowfat_file", __sblgnt_lowfat_files__)
    def test_no_errors(lowfat_file):
        count = len(run_xpath_for_file(ERROR_EXPRESSION, lowfat_file))
>       assert count == 0
E       assert 1 == 0

test_sblgnt_lowfat.py:86: AssertionError
========================================== short test summary info ==========================================
FAILED test_nestle1904_lowfat.py::test_no_errors[../Nestle1904/lowfat/05-acts.xml] - assert 1 == 0
FAILED test_sblgnt_lowfat.py::test_no_errors[../SBLGNT/lowfat/05-acts.xml] - assert 1 == 0
FAILED test_sblgnt_lowfat.py::test_no_errors[../SBLGNT/lowfat/06-romans.xml] - assert 1 == 0
=============================== 3 failed, 51 passed, 715 deselected in 3.08s ================================

Copy link

linear bot commented Oct 14, 2024

@jacobwegner
Copy link
Collaborator Author

@jonathanrobie I've added the tests as requested; please take a look when you're able, and if all looks good, I can merge them in to main.

@jacobwegner
Copy link
Collaborator Author

(@jonathanrobie will try and create a new branch with a "manual" fix to the Lowfat, and I can help update the tests / pipeline at that point)

@jacobwegner jacobwegner merged commit e9ec642 into main Oct 16, 2024
1 check passed
@jacobwegner jacobwegner deleted the rnd-26-add-additional-unit-tests-for-error-element branch October 16, 2024 18:15
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

Successfully merging this pull request may close these issues.

1 participant