zopefoundation / zope.i18n

APIs and data related to internationalization and localization.
Other
2 stars 13 forks source link

testRegisterAndCompileTranslations fails #22

Open Profpatsch opened 7 years ago

Profpatsch commented 7 years ago
======================================================================
FAIL: testRegisterAndCompileTranslations (zope.i18n.tests.test_zcml.DirectivesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python2.7-zope.i18n-4.1.0.drv-0/zope.i18n-4.1.0/src/zope/i18n/tests/test_zcml.py", line 153, in testRegisterAndCompileTranslations
    self.assertEqual(msg, _u("I'm a newer file translated"))
AssertionError: u"I'm a newer file" != u"I'm a newer file translated"
- I'm a newer file
+ I'm a newer file translated
?                 +++++++++++
> pip list
extras (0.0.3)
linecache2 (1.0.0)
lxml (3.7.0)
pbr (1.8.1)
pip (9.0.1)
python-mimeparse (0.1.4)
python-subunit (1.1.0)
pytz (2016.6.1)
setuptools (30.2.0)
six (1.10.0)
testscenarios (0.4)
testtools (1.8.0)
traceback2 (1.4.0)
unittest2 (1.1.0)
wheel (0.29.0)
zope.component (4.2.1)
zope.configuration (4.0.3)
zope.event (4.0.3)
zope.exceptions (4.0.8)
zope.i18nmessageid (4.0.3)
zope.interface (4.1.3)
zope.location (4.0.3)
zope.proxy (4.1.6)
zope.schema (4.4.2)
zope.security (4.0.3)
zope.testing (4.6.1)
zope.testrunner (4.4.10)
icemac commented 7 years ago

@Profpatsch How did you run the tests. On TravisCI they are currently green besides a problem on Python 3.5 which looks different from the one you described here.

Profpatsch commented 7 years ago

Well, they are run automatically on build by nix; network & everything outside of the build folder is not accessible (sandboxed).

mgedmin commented 7 years ago

I cannot reproduce locally with tox.

icemac commented 7 years ago

@mgedmin Same here.

Profpatsch commented 7 years ago

Hm, then maybe it’s not worth the effort. I’ll just skip the tests here.

mgedmin commented 7 years ago

No, no, if we have nondeterministic test failures, we should hunt them down and fix them.

It's just that more information may be needed to help us reproduce this so we can fix it.

they are run automatically on build by nix

Do you know what command nix uses to run the tests? Is it tox? Is it setup.py test? Is it something else?

mgedmin commented 5 years ago

Ooh, I wonder if this could be related to file mtimes? IIRC Nix sets all the mtimes to 0, which makes it harder to determine whether a .mo file is up to date or not.

We have checks like if po_mtime > mo_mtime that could break under those circumstances