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

Fix "Nines" bug and add tests #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

MitchAngenent
Copy link

The code in this PR is build on top of @weefatboi's work (#2). tests\test_millify.py now contains unit tests that test the fix by @weefatboi, and the existing code. Based on the tests, three changes are made to __init__.py:

  • Only use custom prefixes if a list is passed;
  • Only use a custom separator if a string is passed;
  • For numbers with more than five digits that were passed to prettify() with a custom separator, the custom separator only appeared as last thousand separator. This is fixed by passing separator on the recursive call of prettify().

After these changes, all tests were passed.

@MitchAngenent MitchAngenent mentioned this pull request Oct 4, 2021
@MitchAngenent
Copy link
Author

@azaitsev, could you please look into this PR? Let me know if any additional tests are desirable. If you merge this PR, could you deploy a new version of millify to PyPI?

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.

None yet

1 participant