| Trees | Indices | Help |
|
|---|
|
|
1 # Moovida - Home multimedia server 2 # Copyright (C) 2006-2009 Fluendo Embedded S.L. (www.fluendo.com). 3 # All rights reserved. 4 # 5 # This file is available under one of two license agreements. 6 # 7 # This file is licensed under the GPL version 3. 8 # See "LICENSE.GPL" in the root of this distribution including a special 9 # exception to use Moovida with Fluendo's plugins. 10 # 11 # The GPL part of Moovida is also available under a commercial licensing 12 # agreement from Fluendo. 13 # See "LICENSE.Moovida" in the root directory of this distribution package 14 # for details on that license. 15 16 from elisa.core.tests.elisa_test_case import ElisaTestCase 17 from elisa.core.utils import exception_hook 18 import sys, platform 19215923 ElisaTestCase.__init__(self, methodName) 24 if platform.system() == 'Windows': 25 self.skip = "test not supported under windows"2628 # test, that it does not fail 29 from twisted.python.failure import Failure 30 f = Failure(Exception) 31 data = exception_hook.format_failure(f)3234 # test, that it does not fail 35 try: 36 raise Exception 37 except: 38 info = sys.exc_info() 39 data = exception_hook.format_traceback() 40 data2 = exception_hook.format_traceback(*info)4143 data = 'Pocahontas\nMikey Mouse' 44 path = exception_hook.write_to_logfile(data) 45 self.failUnless(path) 46 47 r = open(path,'r').read() 48 self.assertEquals(data, r)4951 path = exception_hook.write_to_logfile('', logdir='/') 52 self.failIf(path) 53 54 path = exception_hook.write_to_logfile('', logdir='/never') 55 self.failIf(path) 56 57 path = exception_hook.write_to_logfile('', logdir='/var/log') 58 self.failIf(path)
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Dec 1 10:55:49 2009 | http://epydoc.sourceforge.net |