-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
🧪 Integrate Hypothesis in tests #860
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #860 +/- ##
==========================================
+ Coverage 95.57% 95.62% +0.05%
==========================================
Files 30 30
Lines 4924 4981 +57
Branches 447 464 +17
==========================================
+ Hits 4706 4763 +57
Misses 192 192
Partials 26 26
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
e6af87c
to
23f4ed0
Compare
@mjpieters I started looking into using Hypothesis during PyCon (the maintainer helped me start). |
I was going to look into that since I found this PR! It does look like |
Actually, no this is not a bug in Yarl; it is a bug in your Hypothesis tests. test_quote_unquote_parameter(
quoter=yarl._quoting_c._Quoter,
unquoter=yarl._quoting_c._Unquoter,
text_input='0',
safe='',
unsafe='0', # <--- 0 is unsafe
protected='',
qs=False,
requote=False,
) With Either not tell Hypothesis to provide input to |
@mjpieters yeah, I never used these and wasn't sure about the semantics which is why I asked you. My objective is to make the foundation for adding more Hypothesis testing in the future and so the contributors could look at the examples... |
6d4483d
to
b68147b
Compare
958a7d4
to
19b85a6
Compare
98412df
to
37a9f48
Compare
d0a3aff
to
c3036c3
Compare
Got it working with a basic implementation. I figure we can always expand it later. |
not sure why it fails on 3.8 and 3.9 linux/mac only |
@bdraco the tests don't fail but overall pytest session does, due to low coverage it's probably hitting fallback code branches:
We should just update Also, could you use the “rebase” button on the UI for my branches, instead of producing foxtrot merges? |
👍
I will keep that preference in mind for the future. Also, I only show an update branch button and no rebase button in the UI, but happy to rebase manually instead. |
That sounds reasonable. It'd be nice to have own strategy exposed under |
@bdraco it's the same button, but it's a bit unobvious. There's an arrow with a drop-down on the update button (on its right side) that lets you select the mode (it won't let you select rebase if there are conflicts, though — in that case it'd require doing it locally). |
O wow. I apparently have been missing that for years 🤦 Its unfortunate that GitHub doesn't have a configuration option to order it based on preference |
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
https://github.com/motlin/forbid-merge-commits-action might be an option |
@bdraco so my strategy is tailored to individual PRs. If a contributor maintains their commits in the PR branch well, I prefer merging such PRs using the natural merge. And that's what I like to do in my PRs, as I control them. When I experiment, I may add some silly WIP commits but then, I always clean up the history before merging. When somebody has a mess, including but not limited to foxtrot merges in their PR, only then I consider using the “squash merge” option. |
Thanks for clarifying. Apologizes if I overstepped. |
No problem! After all, I never explained this explicitly, nor did I deselect the checkbox to allow others to change the branch in my work. All's good :) |
What do these changes do?
$sbj
Are there changes in behavior for the user?
Nah
Related issue number
Nope
Checklist
CHANGES
folder<issue_id>.<type>
(e.g.588.bugfix
)issue_id
change it to the pr id after creating the PR.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.Fix issue with non-ascii contents in doctest text files.