Remove use of ramdom.getrandbits.#583
Conversation
|
There are multiple alternatives if you prefer:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #583 +/- ##
==========================================
- Coverage 97.81% 97.80% -0.01%
==========================================
Files 23 23
Lines 5714 5695 -19
Branches 352 352
==========================================
- Hits 5589 5570 -19
Misses 75 75
Partials 50 50 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
I think these two would be preferential over suppressions. Normally, I'd ask for the ephemeral port 0 in e2e tests. But if this is only for mocking, I don't see how randomizing is useful at all, and so I don't have a problem with hardcoding a few values like 666 and 999, for example. This sounds like the cleanest solution to me. |
The tests for random port use were duplicates. Other uses of getrandombits were converted to fixed ports.
After making your proposed change it became clear the tests were duplicates. Confirmed by removing them and |
What do these changes do?
Remove use of ramdom.getrandbits. The tests for random port use were duplicates. Other uses of getrandombits were converted to fixed ports.
Are there changes in behavior for the user?
No
Related issue number
Related #544
Checklist
{py39.py310,py311,py312}-{nocov,cov,diffcov}, qa, docs{py36,py37,py38,py39}-{nocov,cov,diffcov}{py36,py37,py38,py39}-{nocov,cov,diffcov}, pypy3-{nocov,cov}, qa, docs{py36,pypy3}-{nocov,cov,diffcov}, qapy36-{nocov,cov,diffcov}, qa, docsNEWS.rstfile