Skip to content

Functions: test keyword parameter #222

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

Merged
merged 6 commits into from
May 3, 2024

Conversation

despadam
Copy link
Contributor

@despadam despadam commented Apr 18, 2024

Fixes #221

@despadam despadam linked an issue Apr 18, 2024 that may be closed by this pull request
@despadam despadam self-assigned this Apr 18, 2024
@despadam despadam added the upcoming tutorial Stuff to work on/fix before the next tutorial label Apr 18, 2024
Copy link
Member

@baffelli baffelli left a comment

Choose a reason for hiding this comment

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

We should consider how to deal with multiple asserts.
Only the first assertion to fail is shown in the results. This is a design limitation of pytest

baffelli
baffelli previously approved these changes Apr 22, 2024
Copy link
Member

@baffelli baffelli left a comment

Choose a reason for hiding this comment

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

The representation of the error is not ideal, but I suspect there's no better easy way to solve this.

Copy link
Member

@baffelli baffelli left a comment

Choose a reason for hiding this comment

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

Perfect. Only suggestion would be to avoid displaying the assertion below the list, but I'm not sure whether this is possible.

@despadam
Copy link
Contributor Author

Perfect. Only suggestion would be to avoid displaying the assertion below the list, but I'm not sure whether this is possible.

To do that, we would have to change how the test output is displayed in general, but I do not want to touch that now. I think in general testsuite needs some fixes (there are probably some related issues already) but I would prefer to address that in a separate PR after the tutorial, to be safe.

So for now, if you approve, I would merge this PR as is.

Copy link
Member

@yakutovicha yakutovicha left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@despadam despadam merged commit 5442f1a into main May 3, 2024
1 check passed
@despadam despadam deleted the 221-functions-test-positional-vs-keyword-arguments branch May 3, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upcoming tutorial Stuff to work on/fix before the next tutorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Functions: test positional vs keyword arguments
3 participants