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 tests when run under non English locales: #554

Merged
merged 2 commits into from Jun 16, 2017

Conversation

Projects
None yet
2 participants
@zeehio
Contributor

zeehio commented Jun 16, 2017

The testsuite was failing on a computer with a non-English default locale. This PR fixes the tests so they work well under any locale.

  • days_in_month: As N_DAYS_IN_MONTHS has English month names, month() needs to be called with an English locale (the "C" locale is English and always available)

  • wday test: The wday in the test is compared with the English week day, so needs to be in English

  • "month accessor extracts correct month": Comparison with English month names, needs C locale as well

zeehio added some commits Jun 16, 2017

This fixes the tests when run under non English locales:
- days_in_month: As N_DAYS_IN_MONTHS has English month names, month() needs to be called with an English locale (the "C" locale is English and always available)

- wday test: The wday in the test is compared with the English week day, so needs to be in English

- "month accessor extracts correct month": Comparison with English month names, needs C locale as well

@vspinu vspinu merged commit 9e5894a into tidyverse:master Jun 16, 2017

3 checks passed

codecov/patch 100% of diff hit (target 73.34%)
Details
codecov/project 73.34% (+0%) compared to 5a04af3
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@vspinu

This comment has been minimized.

Member

vspinu commented Jun 16, 2017

Thanks!

@zeehio zeehio deleted the zeehio:fix_tests_in_other_locales branch Feb 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment