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 more tests for colour, embeds, files, buttons and modals #9875

Merged
merged 6 commits into from
Oct 9, 2024

Conversation

junah201
Copy link
Contributor

@junah201 junah201 commented Jul 3, 2024

Summary

I added more test case for colour, embeds, files, buttons and modals

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

Test coverage in discord/colour.py improved from 73% to 95%
Test coverage in discord/embeds.py improved from 22% to 80%
Test coverage in discord/embeds.py improved from 81% to 94%
Test coverage in discord/embeds.py improved from 42% to 82%
Improved test coverage for discord/ui/button.py from 35% to 50% and for discord/ui/view.py from 24% to 34%.
tests/test_colour.py Outdated Show resolved Hide resolved
(discord.Colour.pink(), 0xEB459F),
],
)
def test_static_colours(value, expected):
Copy link
Owner

Choose a reason for hiding this comment

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

I just want to make a note that some of these have changed before, e.g. blurple. I'm not sure what the API stability on these are but we have changed them where it makes sense historically. This has no bearing on the tests being here but I just wanted to comment on it.

@Rapptz
Copy link
Owner

Rapptz commented Oct 9, 2024

Sorry for the late response on this PR, huge backlog.

Thanks for the PR though, it's appreciated.

@Rapptz Rapptz merged commit 0298f81 into Rapptz:master Oct 9, 2024
8 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.

2 participants