XLSForm / pyxform

A Python package to create XForms for ODK Collect.
BSD 2-Clause "Simplified" License
77 stars 134 forks source link

Prepare for v1.10.0 release #608

Closed ukanga closed 2 years ago

ukanga commented 2 years ago

When following the release instructions step 2, it seems we do get a failure on the test_warnings_count test. I thought it had to do with the ODK Validate version but that's not the case for 1.16 and 1.15 releases. I wonder, should a group section with no children be an error or a warning? We may need to update the test accordingly by either removing the empty group or adding a child to the group if that is what is desired for the test.

I do not think it should hold approval for this release since the issue should exist in the last couple of releases.

nosetests tests/test_xlsform_spec.py                                                                                     (
E..
======================================================================
ERROR: Should raise an expected number of warnings for a diverse form.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ukanga/ona/pyxform/tests/pyxform_test_case.py", line 258, in assertPyxformXform
    self._run_odk_validate(xml=xml)
  File "/home/ukanga/ona/pyxform/tests/pyxform_test_case.py", line 115, in _run_odk_validate
    check_xform(tmp.name)
  File "/home/ukanga/ona/pyxform/pyxform/validators/odk_validate/__init__.py", line 97, in check_xform
    raise ODKValidateError(
pyxform.validators.odk_validate.ODKValidateError: ODK Validate Errors:
Group has no children! Group: ${labeled_select_group}. The XML is invalid.

Group has no children! Group: ${labeled_select_group}. The XML is invalid.

Group has no children! Group: ${labeled_select_group}. The XML is invalid.

>> Xform is invalid! See above for errors and warnings.

The following files failed validation:
${tmpar0pdk2c}.xml

Result: Invalid

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ukanga/ona/pyxform/tests/test_xlsform_spec.py", line 57, in test_warnings__count
    self.assertPyxformXform(
  File "/home/ukanga/ona/pyxform/tests/pyxform_test_case.py", line 270, in assertPyxformXform
    raise PyxformTestError(
tests.pyxform_test_case.PyxformTestError: ODK Validate error was thrown but 'odk_validate_error__contains' was empty:ODK Validate Errors:
Group has no children! Group: ${labeled_select_group}. The XML is invalid.

Group has no children! Group: ${labeled_select_group}. The XML is invalid.

Group has no children! Group: ${labeled_select_group}. The XML is invalid.

>> Xform is invalid! See above for errors and warnings.

The following files failed validation:
${tmpar0pdk2c}.xml

Result: Invalid

----------------------------------------------------------------------
Ran 3 tests in 0.514s

FAILED (errors=1)

cc: @lognaturel @yanokwa

lognaturel commented 2 years ago

it seems we do get a failure

Sorry about that. I didn't immediately have an answer for what to do and moved on. I think we should modify the test in either of the two ways you described.

lognaturel commented 2 years ago

Should be available now, @ukanga!

ukanga commented 2 years ago

Thank you @lognaturel