arrow-py / arrow

🏹 Better dates & times for Python
https://arrow.readthedocs.io
Apache License 2.0
8.7k stars 673 forks source link

More Detailed Test Cases For Locales #1022

Open anishnya opened 3 years ago

anishnya commented 3 years ago

Feature Request

Many locales have the bare minimum when it comes to test cases. While I understand it can be tedious and repetitive to write out test cases that appear the same for multiple timeframe units, I still believe we should make it necessary. If we do ever make changes to any locale files, which seems to be more often as of late, we want to ensure we aren't being mislead by passing test cases, when there could potentially be some underlying bug/edge case (so often the case with locales) that we'd be missing.

neelrpatel commented 2 years ago

Hi! @akotha7 and I would like to work on this. We aim to improve and increase testing for at least 5 different locales. Please let us know if there is anything we should know.

anishnya commented 2 years ago

Hi @neelrpatel! Both you and @akotha7 are welcome to work on this issue. For this issue, what we want to see is for locales, such as Finnish, that have multiple variations on each timeframe unit, we would like our test cases to cover all the variations within those timeframe units (i.e all variations of the strings for seconds, hours etc). Currently, many of the test cases for these locales only cover the variation for one timeframe unit. Please feel free to ask any questions you have along the way.

neelrpatel commented 2 years ago

@anishnya Besides Finnish, are there any particular locales that you prefer we add more testing to?

neelrpatel commented 2 years ago

@anishnya I've created a PR for additional testing on locales with multiple timeframe variations. The PR description lists which locales I've increased testing on.

anishnya commented 2 years ago

Hey @neelrpatel. Sorry for just seeing this, but the PR you submitted does give us the coverage of the locales that we wanted. I'll take a closer a look at the PR later today and approve it.

neelrpatel commented 2 years ago

@anishnya Awesome, thanks!

kaiyang-code commented 2 years ago

I also want to work on the create more tests for locales. Is it okay I create a new PR about this problem later today? I noticed that this issue is already closed.

kaiyang-code commented 2 years ago

Hi! @anishnya. In particular, I have noticed that some locales have fewer test cases than others. I plan to expand test cases for those locales

anishnya commented 2 years ago

Hi @kaiyang-code, yes feel free to open a PR on the issue and I'll be more than happy to take a look at it. Let us know if you have any questions.

kaiyang-code commented 2 years ago

@anishnya I am ready to create a PR. I read that I have to update documentation? Could you elaborate on which documentation should I update? Thank you in advance!

anishnya commented 2 years ago

For this PR there wouldn’t need to be any additional documentation.

On Thu, Dec 16, 2021 at 5:17 PM kaiyang-code @.***> wrote:

@anishnya https://github.com/anishnya I am ready to create a PR. I read that I have to update documentation? Could you elaborate on which documentation should I update? Thank you in advance!

— Reply to this email directly, view it on GitHub https://github.com/arrow-py/arrow/issues/1022#issuecomment-996236733, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKPCQOGEJYPJAHN33WEGPDURJQQ3ANCNFSM5CE3PBIQ . You are receiving this because you were mentioned.Message ID: @.***>

kaiyang-code commented 2 years ago

@anishnya Got it, I just create a PR #1076

ashleybellomy commented 2 years ago

I submitted some additional test cases, as well.