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

Merged
merged 2 commits into from Jun 16, 2017

Conversation

@zeehio
Copy link
Contributor

@zeehio 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 2 commits Jun 16, 2017
- 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
3 checks passed
@codecov
codecov/patch 100% of diff hit (target 73.34%)
Details
@codecov
codecov/project 73.34% (+0%) compared to 5a04af3
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@vspinu
Copy link
Member

@vspinu 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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants