diff options
Diffstat (limited to 'unitest.py')
-rwxr-xr-x | unitest.py | 15 |
1 files changed, 4 insertions, 11 deletions
@@ -20,8 +20,6 @@ """Glances unitary tests suite.""" -import gettext -import locale import sys import time import unittest @@ -42,11 +40,6 @@ if not is_linux: else: print('Unitary tests for {0} {1}'.format(appname, version)) -# Import local settings -from glances.core.glances_globals import gettext_domain, locale_dir -locale.setlocale(locale.LC_ALL, '') -gettext.install(gettext_domain, locale_dir) - # Init Glances core from glances.core.glances_main import GlancesMain core = GlancesMain() @@ -78,14 +71,14 @@ class TestGlances(unittest.TestCase): print('INFO: [TEST_000] Test the stats update function') try: stats.update() - except: - print('ERROR: Stats update failed') + except Exception as e: + print('ERROR: Stats update failed ({})'.format(e)) self.assertTrue(False) time.sleep(1) try: stats.update() - except: - print('ERROR: Stats update failed') + except Exception as e: + print('ERROR: Stats update failed ({})'.format(e)) self.assertTrue(False) self.assertTrue(True) |