1

I am working on an interface to i18n library ICU (and PyICU) for Flask. In my test suite, I have a test that checks output for different locale settings. The problem I'm having is that locally my tests pass, whereas on the TravisCI instance where they also run, they fail.

The reason? The output from the ICU is evidently different on the two machines. In one test, I check the result of doing a dateformat on a Python dateformat using an italian locale: it_IT. The result locally is `12 apr 2010, 15:46:00'. But on the TravisCI instance, it is altered in a way that doesn't make sense to me. See here:

As you can see, the string that is generated is similar but has these added /s. I'm unsure why this might be happening. Ideas anyone?

UPDATE 10/28/2016

After a bunch of testing to try to reproduce the different date format output that is occurring on the travis instance, I have been unable to reproduce this issue. I tried the following:

  1. Explicitly setting the locales on the travis instance by adding the following to the before_install script:

    sudo locale-gen "en_US.UTF-8"
    sudo update-locale
    sudo dpkg-reconfigure locales

  2. I spun up the ec2 instance that the Travis Trusty Tahr machine is supposedly based on (see here) and I tried installing everything needed and running my tests. No errors!

  3. I tried setting my dev machines locales to the ones set on the travis instance. Again, No errors!.

  4. I tried a different locale, just to see if it was perhaps something to do with that particular locale, but got another aberration:

So it seems likely at this point that something other than the locale settings are causing the incorrect output.

fraxture
  • 5,113
  • 4
  • 43
  • 83
  • probably a different locale. – Marc B Sep 15 '16 at 15:15
  • It's not a different locale. It's the same test yielding different results on two machines. – fraxture Sep 15 '16 at 15:19
  • 1
    but yeah... two different machines, so potentially two different configurations. check the locale settings. – Marc B Sep 15 '16 at 15:20
  • ahah. so the the locale settings are independent of ICU? how can i check them? – fraxture Sep 15 '16 at 15:21
  • on linux you could use [locale](http://linux.about.com/library/cmd/blcmdl1_locale.htm) command – keety Sep 15 '16 at 15:23
  • So at this point, I have played around a lot with the locale settings to no avail. The problem above seems mainly to occur on the Travis build machine. When I spun up an Ubuntu 14.04 VirtualBox the altered output didn't occur. When I set the locals on that VM to the locale settings on the Travis machine, the problem still did not occur. So at this point I am wondering if something else could lead to different outputs... It also strikes me that the output may just be wrong for the specified locale "it_IT". – fraxture Oct 28 '16 at 05:11

0 Answers0