Remove OS specific commands from translation test.

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Bruno Araújo <burno.araujo@openbossa.org>
This commit is contained in:
Hugo Parente Lima 2010-09-09 18:09:28 -03:00
commit be5bd91e72

View file

@ -4,6 +4,7 @@
'''Unit tests to test QTranslator and translation in general.''' '''Unit tests to test QTranslator and translation in general.'''
import os import os
import glob
import unittest import unittest
from PySide.QtCore import * from PySide.QtCore import *
@ -16,10 +17,12 @@ class TranslationTest(UsesQCoreApplication):
super(TranslationTest, self).setUp() super(TranslationTest, self).setUp()
self.trdir = os.path.join(os.path.dirname(__file__), 'translations') self.trdir = os.path.join(os.path.dirname(__file__), 'translations')
# os.system is probably not the best way to do it # os.system is probably not the best way to do it
os.system('lrelease %s/*.ts > /dev/null' % self.trdir) for file in glob.glob('%s/*.ts' % self.trdir):
self.assertFalse(os.system('lrelease -silent %s' % file))
def tearDown(self): def tearDown(self):
os.system('rm %s/*.qm > /dev/null' % self.trdir) for file in glob.glob('%s/*.qm' % self.trdir):
os.remove(file)
super(TranslationTest, self).tearDown() super(TranslationTest, self).tearDown()
def testLatin(self): def testLatin(self):