-
Notifications
You must be signed in to change notification settings - Fork 440
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 the loading of the currency format types #203
Conversation
Current coverage is
|
The decrease in overall coverage is due to a change in a doctest. Maybe codecov is not running them? |
@etanol tests are run by travis using pytest, if doctests aren't run that's a bug but IIRC they are run. |
@sils1297 Then, how can I avoid this coverage decrease? |
@etanol you should be able to reproduce the coverage report with |
There seems to be a problem with the process environment on Windows for Python 2.7. The function I'm going to change the doctest so this doesn't fail. However, maybe some review needs to be performed on the AppVeyor configuration, since all Python 3 setups appear to work fine. |
== u'$1,099.98') | ||
|
||
|
||
def test_format_currency_format_type(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a big fan of using multiple assertions like that in a single test case, I would write 3 test cases:
test_format_current_with_standard_format_type
test_format_current_with_accounting_format_type
test_format_current_with_invalid_format_type
Just personal taste (this is not a blocker to approve this PR. 😄 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duly noted. I'll keep this in mind for future PRs.
@sils1297 this looks good to me. |
@etanol We don't have any formal guideline regarding this, but I think asking PR authors to do this it's the easiest way to keep our change log updated. Thank's |
@erickwilder Done. I took the chance to include information related to my other PR #180. I hope is not an issue. |
@etanol it seems we are still not capable of maintaining this repository without larger delays for basically everything and you're more of a Babel dev than I am tbh. You do seem to have some kind of interest in Babel, would you be interested in help us reviewing and triaging bugs a bit? |
@sils1297 Sure, I'll be glad to help. Although my availability is variable, I always try to dedicate a couple of hours a week to free coding. |
@etanol cool, nobody is full time availabe for this one anyway. Whenever your passion takes over feel free to review some "pending review" PRs. I'll try to get you permissions to relabel stuff, we still need @mitsuhiko to do that kind of stuff and it's usually hard to grab him. |
Hi @etanol Sorry for the delay. My daughter was born a couple days ago and I was out of the radar for a while. |
@etanol marking this one in-progress as it seems to need a rebase and coverage still complains. |
Current coverage is
|
@etanol are there any notable changes from the state where @erickwilder approved this? Does it need another full review? |
@sils1297 I need to fix the |
You may want to merge my PR that sets the version numbers in CHANGES right
|
And well, this needs of course a rebase because of the damn conflicts file :) |
The type of the currency format (e.g. "standard", "accounting") was not interpreted correctly from the CLDR data. Now there should not be any currency format identified by "None". Fixes #201
Previous commit introduced an API change by changing the behaviour of the format param, instead this commit adds a format_type param and the documentation and tests to accompany it. Note that currency_formats returns a NumberPattern already, so there is no need to call parse_pattern on the value returned.
Fix the loading of the currency format types
In order to fix #201, it was necessary to properly interpret the
type
attribute of thecurrencyFormat
elements in CLDR data. It apparently changed between version 23 and 26.