Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test that checks README.rst against usbsdmux -h output #65

Merged
merged 2 commits into from
Dec 22, 2023

Conversation

jluebbe
Copy link
Member

@jluebbe jluebbe commented Dec 21, 2023

The usbsdmux -h output in the README.rst has become out of date with the actual output of the tool.
This can be quite confusing, as it makes it unclear which features the tool has.

Update the README.rst content and make sure it stays up to date via a pytest test case.

This is an alternative to #64. Instead of adding a custom Actions workflow for a special check, integrate it as a test into the pytest testsuite. This also gives us the diff output through assertions (see https://github.com/jluebbe/usbsdmux/actions/runs/7288823489/job/19862144881#step:4:84 as an example).

hnez and others added 2 commits December 21, 2023 14:31
A README that does not match the behaviour of the program can be quite
confusing. Sync the usbsdmux -h output with the actual output.

Signed-off-by: Leonard Göhrs <[email protected]>
Copy link
Member

@hnez hnez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this a lot harder to read than than what I did in #64 (I am obviously biased here because I wrote it) because of the pytest trickery that I am not too familiar with and because it actually tries to "parse" the output in README.rst, which I did avoid on purpose to keep it simple.

But I agree that adding it as a pytest test is better than adding yet another workflow, so I'd say lets not over-bikeshed this and:

LGTM.

@jluebbe
Copy link
Member Author

jluebbe commented Dec 21, 2023

I had the simple variant first as well, but found the diff output was worth the additional code.

@SmithChart SmithChart merged commit 1a68038 into linux-automation:master Dec 22, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants