Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

1 participant