arrow-py / arrow

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

Add tests for ChineseCNLocale #962

Closed lyl1999 closed 3 years ago

lyl1999 commented 3 years ago

Pull Request Checklist

Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:

If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!

Description of Changes

Added a simple test for ChineseCNLocale in test_locales.py

systemcatch commented 3 years ago

This is the test that is failing.

  =================================== FAILURES ===================================
  __________________ TestChineseCNLocale.test_format_timeframe ___________________

  self = <tests.test_locales.TestChineseCNLocale object at 0x7f3a008a6130>

      def test_format_timeframe(self):
          assert self.locale._format_timeframe("now", 0) == "εˆšζ‰"
  >       assert self.locale._format_timeframe("second", 1) == "1η§’"
  E       AssertionError: assert 'δΈ€η§’' == '1η§’'
  E         - 1η§’
  E         + δΈ€η§’

  tests/test_locales.py:1404: AssertionError
jadchaar commented 3 years ago

@lyl1999 we'd love to get these changes merged in, but in order to do that we need the tests to pass. Feel free to re-open this PR if you get around to fixing the tests so that they pass.