Skip to content

test: Fix test for older click version

With older click version (e.g. 7.0-1), the text wrapping can be different, resulting in some docstring text included in this command list, so check we find the expected commands instead [1] [2]

Refs. swh/infra/sysadm-environment#4992 (closed)

[1] 'defined ...' is part of the first line of the docstring for the "init" subcommand.

10:21:42  E       AssertionError: assert ['init', 'defined...', 'journal', 'list', 'stalled', 'storage'] == ['init', 'journal', 'list', 'stalled', 'storage']
10:21:42  E         At index 1 diff: 'defined...' != 'journal'
10:21:42  E         Left contains one more item: 'storage'
10:21:42  E         Full diff:
10:21:42  E         - ['init', 'journal', 'list', 'stalled', 'storage']
10:21:42  E         + ['init', 'defined...', 'journal', 'list', 'stalled', 'storage']
10:21:42  E         ?         ++++++++++++++

[2] https://jenkins.softwareheritage.org/view/swh-debian%20(draft)/job/debian/job/packages/job/DSCRUB/job/gbp-buildpackage/31/console

Merge request reports