Closed mtelka closed 11 months ago
Thanks for the report, a PR is welcome!
Hello, I would like to work on this issue. If you don't mind, could you tell me how to run the test and achieve the same results so that I can my hands on fixing it?
Thanks!
Sure, something like this. Assuming you've already forked and cloned, then:
# First do an editable install
pip install -e ".[tests]"
# Generate translations
scripts/generate-translation-binaries.sh
$ # Then run tests
$ pytest tests/test_i18n.py
================================================================================================ test session starts ================================================================================================
platform darwin -- Python 3.11.5, pytest-7.4.2, pluggy-1.3.0
Test order randomisation NOT enabled. Enable with --random-order or --random-order-bucket=<bucket_type>
rootdir: /Users/hugo/github/humanize
configfile: pyproject.toml
plugins: random-order-1.1.0, anyio-4.0.0, asyncio-0.21.0, flaky-3.7.0, timeout-2.1.0, cov-4.1.0, respx-0.20.1, mock-3.11.1, xdist-3.3.1, hypothesis-6.75.2, lazy-fixture-0.6.3, aiohttp-1.0.4
asyncio: mode=Mode.STRICT
collected 28 items
tests/test_i18n.py ............................ [100%]
================================================================================================= warnings summary ==================================================================================================
tests/test_i18n.py::test_i18n
/Users/hugo/github/humanize/src/humanize/i18n.py:126: DeprecationWarning: Plural value must be an integer, got float
return get_translation().ngettext(message, plural, num)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================================================================================== 28 passed, 1 warning in 0.04s ===========================================================================================
Alright, I believe i can handle this. Could you assign it to me?
Ps: Could you also kindly add the hacktoberfest label too? Thanks!
We don't normally assign issues but go ahead. Also the repo already has the Hacktoberfest topic, so we don't need to label it. Thanks!
Apologies as this is my first PR, but how do I run the checks required? I didn't find anything related to that from the Contributing docs
For new contributors, I need to click a button to approve the CI run. It's a GitHub default to prevent cryptocoin mining. I've now clicked it! ⏯️
Hello @hugovk, is there any guideline I may have overlooked? I have refixed the code and passed the tests, but it hasn't been merged yet so I was wondering if there is something I might have missed. Apologies if I'm being such a bother at the moment.
Hi there, everything looks in place, I just need to find some time to give it a review. Don't worry, I expect we can get it all sorted during October :) Thanks!
Alright then. Thank you :)
What did you do?
I ran tests.
What did you expect to happen?
Tests pass without warnings.
What actually happened?
The following warning was reported:
What versions are you using?