Skip to content
New issue

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

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

Already on GitHub? # to your account

testutils: mark tests in RC tracking issue and comment on status #173

Merged
merged 1 commit into from
Aug 5, 2020

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Jul 17, 2020

This implements the functionality seen in #172, so marking a task as done in the tracking issue if it is succeeding (and not already marked as done) and commenting the results (if they are not already provided)

@miri64
Copy link
Member Author

miri64 commented Jul 29, 2020

Rebased to current master

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

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

I believe this could be improved by editing a single comment instead of continuously posting a comment for each test. But the work that has been done is already huge, so lets leave that as a future improvement. Can you just explain why the return yield?

conftest.py Outdated
Comment on lines 98 to 100
result = yield
testutils.github.update_issue(report)
return result
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand why return yield?

Copy link
Member Author

Choose a reason for hiding this comment

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

yield in a keyword to yield to the caller. This can produce results in fact. So what is here is

return result

not return yield.

This is done in case the wrapping pytest_runtest_logreport() returns something. See also https://docs.pytest.org/en/stable/writing_plugins.html#hookwrapper-executing-around-other-hooks

Copy link
Member Author

Choose a reason for hiding this comment

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

Then again: It is not expected to return anything... so no idea... will remove.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the pointers to the documentation, it is clearer to me know.

@fjmolinas
Copy link
Contributor

please rebase and squash @miri64

@miri64 miri64 force-pushed the pytest/enh/github branch from 08e331b to 98774d3 Compare August 5, 2020 08:18
@miri64
Copy link
Member Author

miri64 commented Aug 5, 2020

Rebased and squashed.

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

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

ACK!

@fjmolinas fjmolinas merged commit 54ff458 into RIOT-OS:master Aug 5, 2020
@miri64 miri64 deleted the pytest/enh/github branch August 5, 2020 08:42
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants