Issue 2550660
 
 
 
              
              
Created on 2010-08-05 12:34 by benni, last changed 2010-08-09 04:43 by richard. 
  
 
  
   | msg4102 | 
   Author: [hidden] (benni) | 
   Date: 2010-08-05 12:34 | 
   
    
    | 
   
  
   
    ust a minor bug-report for roundup:
i just try to install roundup 1.4.15. If i run the test scripts i got
some test failed messages, which seems to be only translation issues?
They look all like this:
testIntervalPretty (test.test_dates.DateTestCase) ... 
Failure in test testIntervalPretty (test.test_dates.DateTestCase)
Traceback (most recent call last):
  File "/usr/lib/python2.5/unittest.py", line 260, in run
    testMethod()
  File "/root/roundup-1.4.15/./test/test_dates.py", line 377, in
testIntervalPretty
    ae('2y', 'in 2 years')
  File "/root/roundup-1.4.15/./test/test_dates.py", line 376, in ae
    self.assertEqual(Interval(spec).pretty(), pretty)
  File "/usr/lib/python2.5/unittest.py", line 334, in failUnlessEqual
    (msg or '%r != %r' % (first, second))
AssertionError: 'in 2 Jahren' != 'in 2 years'
or like this:
testEncNonUTF8 (test.test_mailgw.MailgwTestCase) ... 
Failure in test testEncNonUTF8 (test.test_mailgw.MailgwTestCase)
Traceback (most recent call last):
  File "/usr/lib/python2.5/unittest.py", line 260, in run
    testMethod()
  File "/root/roundup-1.4.15/./test/test_mailgw.py", line 1341, in
testEncNonUTF8
    ''')
  File "/root/roundup-1.4.15/./test/test_mailgw.py", line 87, in
compareMessages
    raise AssertionError, '\n'.join(res)
AssertionError: Generated message not correct (diff follows, expected
vs. actual):
- Contrary, Mary <mary@test.test> added the comment:
+ Contrary, Mary <mary@test.test> merkte an:
  
  A message with encoding (encoded oe =F6)
  
  ----------
  status: unread -> chatting
This could be iritate users who runs the test, so it should be fixed.
Regards, Benni
    | 
   
 
 
  
   | msg4103 | 
   Author: [hidden] (ber) | 
   Date: 2010-08-05 13:57 | 
   
    
    | 
   
  
   
    Thanks for the report. Which "locale" settings langugage did you use 
for the test? (Run "locale" to find out). 
    | 
   
 
 
  
   | msg4104 | 
   Author: [hidden] (ber) | 
   Date: 2010-08-05 14:47 | 
   
    
    | 
   
  
   
    I can run all tests from the roundup source directory
without problems with locale LC_MESSAGES=de_DE.UTF-8.
However I do not have roundup installed in the system
so in roundup/i18n.py find_locales() works and gets me 'de' among 
others, but get_translation() will not find ./locale/de.po in my case, 
because tracker_home is empty. 
My hypothesis is that Benni has an installed roundup in the system
files and uses a German locale, so i18n find his locale.
If I add tracker_home='.' to i18n.py or install roundup in the system
I can reproduce the problem.
Potential solution: Make the test explicitely disable translations.
Suggested in addition: somehow add the source code dir "locale" to the 
search directories for the tests, this would enable i18n tests
and would allow to test that running the non-i18n tests are actually 
independent from a system installed roundup.
Workaround: Disable all translations for running the tests, e.g.
by changing the following line at the bottom of roundup/i18n.py to
 translation = 
get_translation(translation_class=RoundupNullTranslations) 
    | 
   
 
 
  
   | msg4106 | 
   Author: [hidden] (richard) | 
   Date: 2010-08-09 04:43 | 
   
    
    | 
   
  
   
    I've had relevant tests set the locale to "C". 
    | 
   
 
 
|
 
| Date | 
User | 
Action | 
Args | 
 
| 2010-08-09 04:43:47 | richard | set | status: new -> closed nosy:
  + richard messages:
  + msg4106 priority: normal assignee: richard resolution: accepted |  
| 2010-08-05 14:47:19 | ber | set | messages:
  + msg4104 title: Tests failed -> Tests fail because of internationalized strings, if a translation file can be found |  
| 2010-08-05 13:57:39 | ber | set | nosy:
  + ber messages:
  + msg4103 |  
| 2010-08-05 12:34:24 | benni | create |  |  
 
 
 |