Bug#1103040: Resolve test failure of finalcif in TestCheckCifInterface
Fu, Rong (CN)
Rong.Fu.CN at windriver.com
Mon Apr 14 08:12:04 BST 2025
Package: finalcif
Version: 137+dfsg-2
Severity: normal
Dear Maintainer,
I'd like to submit a patch for the finalcif package that fixes a failing test "test_checkcif.TestCheckCifInterface".
See the failure in https://ci.debian.net/packages/f/finalcif/unstable/amd64/59621599/
Check the URL in the test case, 'from_index' is one of the form options.
[cid:image002.png at 01DBAD4F.33FF69C0]
Without the fix, the output of case
pytest ./tests/test_checkcif.py
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:207: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
==================================================== test session starts =====================================================
platform linux -- Python 3.13.3, pytest-8.3.5, pluggy-1.5.0
rootdir: /home/finalcif/finalcif-137+dfsg
configfile: pyproject.toml
plugins: cov-5.0.0, asyncio-0.25.1, flaky-3.8.1, typeguard-4.4.2, httpbin-2.1.0, xdist-3.6.1
asyncio: mode=Mode.STRICT, asyncio_default_fixture_loop_scope=None
collected 19 items
tests/test_checkcif.py .........Fs........ [100%]
========================================================== FAILURES ==========================================================
_________________________________________ TestCheckCifInterface.test_form_field_keys _________________________________________
self = <tests.test_checkcif.TestCheckCifInterface testMethod=test_form_field_keys>
def test_form_field_keys(self):
fields = self.form.fields.keys()
print("Form fields:", self.form.fields)
fields.sort()
> self.assertEqual(
['Qemailaddress', 'UPLOAD', 'filecif', 'outputtype', 'referer', 'runtype', 'validtype', 'valout'],
fields
)
E AssertionError: Lists differ: ['Qem[30 chars]f', 'outputtype', 'referer', 'runtype', 'validtype', 'valout'] != ['Qem[30 chars]f', 'from_index', 'outputtype', 'referer', 'ru[25 chars]out']
E
E First differing element 3:
E 'outputtype'
E 'from_index'
E
E Second list contains 1 additional elements.
E First extra element 8:
E 'valout'
E
E ['Qemailaddress',
E 'UPLOAD',
E 'filecif',
E + 'from_index',
E 'outputtype',
E 'referer',
E 'runtype',
E 'validtype',
E 'valout']
tests/test_checkcif.py:96: AssertionError
---------------------------------------------------- Captured stdout call ----------------------------------------------------
Form fields: ['filecif', 'from_index', 'runtype', 'referer', 'outputtype', 'Qemailaddress', 'validtype', 'valout', 'UPLOAD']
================================================== short test summary info ===================================================
FAILED tests/test_checkcif.py::TestCheckCifInterface::test_form_field_keys - AssertionError: Lists differ: ['Qem[30 chars]f', 'outputtype', 'referer', 'runtype', 'validtype', 'valout'] != ['Qem[30 c...
========================================== 1 failed, 17 passed, 1 skipped in 0.74s ===========================================
With the fix:
pytest ./tests/test_checkcif.py
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:207: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
==================================================== test session starts =====================================================
platform linux -- Python 3.13.3, pytest-8.3.5, pluggy-1.5.0
rootdir: /home/finalcif/finalcif-git-test/finalcif-137+dfsg
configfile: pyproject.toml
plugins: cov-5.0.0, asyncio-0.25.1, flaky-3.8.1, typeguard-4.4.2, httpbin-2.1.0, xdist-3.6.1
asyncio: mode=Mode.STRICT, asyncio_default_fixture_loop_scope=None
collected 20 items
tests/test_checkcif.py ...........s........ [100%]
=============================================== 19 passed, 1 skipped in 0.74s ================================================
root at debian-dev-rfu:/home/finalcif/finalcif-git-test/finalcif-137+dfsg#
Thank you for considering this patch attached
Rong Fu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20250414/65fb43c3/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 155109 bytes
Desc: image002.png
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20250414/65fb43c3/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_checkcif_TestCheckCifInterface.patch
Type: application/octet-stream
Size: 1341 bytes
Desc: fix_checkcif_TestCheckCifInterface.patch
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20250414/65fb43c3/attachment-0001.obj>
More information about the debian-science-maintainers
mailing list