Custom options for test-file and co.
Currently test-file and co. do not allow to set values for the extra_options and extra_links. So Sphinx would claim about a not registered option.
test-file and co. should allow all options/links and just copy&paste them to the next level without any interpretation.
This would allow to set values for user specific options/links.
@danwos
If this is implemented, does this mean, if I write
.. test-file:: My Test Data
:file: my_test_data.xml
:id: TESTFILE_1
:links: [[tr_link('classname', 'title')]]
the "links" option and the value set (via dynamic function) will be copied over to test-suite, test-case etc. because they are all linked with each other?
Else how do you plan to set a option value for a need like test-case, which would be automatically generated?
Is needs_global_options the only way?
@twodrops Yes, but this is already done for links, status, tags and collapse:
See https://sphinx-test-reports.readthedocs.io/en/latest/directives/test_file.html#usage
But this behavior is missing for all other options, especially the ones defined in needs_extra_options and needs_extra_links.
I think this also answers your second question: You set it in test-file and it gets reused for test-suite and test-case.
But needs_global_options can be used as well.
However, I think using it in test-file is much easier and more precise, if multiple result-files get documented.
ah I missed this part. Thanks for the hint.
All other options like tags, links, status are copied from test-file directive to the autogenerated test-suite and test-case directives.
Yes I agree that this would be a perfect solution than using 'needs_global_options'.
Hello,
I miss this feature too. Is it planned for an implementation ?
Thanks for your great work
No, nothing planned from my side, as I have currently too much load in other projects.