Using `expect_test_failure` causes lint to fail
The expect_test_failure test attribute was added in Galaxy 22.01 (https://github.com/galaxyproject/galaxy/pull/10304), but using it causes a linting error as 'not allowed':
.. ERROR: Invalid XML found in file: pm_muairss_write.xml.
Errors [/tmp/tmpp56zw22j:111:0:ERROR:SCHEMASV:SCHEMAV_CVC_COMPLEX_TYPE_3_2_1: Element 'test', attribute 'expect_test_failure': The attribute 'expect_test_failure' is not allowed.]
The tests themselves work fine, it's only the linting that fails. I'm using Planemo v0.74.9
A release of galaxy-tool-util for 22.01 is needed. Ping @jmchilton @mvdbeek
@elichad out of interest : what is the use case for this attribute in this test? I'm surprised to see it used in normal tool tests..
I have a tool which accepts four different data types, but one of the data types is failing due to a bug in our package upstream. We have identical tests for each data type which use <assert_contents> on the output, and I prefer to mark an expected failure temporarily rather than rely on remembering to add the test later when the bug is fixed. https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/blob/cifxyz/pm_muairss_write/pm_muairss_write.xml#L111
That is the underlying program produces wrong output that does not match the assertion? Sounds like a great use case for expect_test_failure.
It actually just raises an error and doesn't produce any output, but expect_failure doesn't like it (edit: fails in planemo test) if you have output tests as well
I'm surprised that this works in planemo test .. is the program producing a nonzero exit code?
Yes, it's nonzero.
I think the linting issue should be fixed in the latest planemo releases, and we have a couple of tests in the iuc that use expect_failure , so I'll close this as likely fixed.