Home | Trees | Indices | Help |
|
---|
|
1 """unit tests for logilab.common.deprecation""" 2 3 import warnings 4 5 from logilab.common.testlib import TestCase, unittest_main 6 from logilab.common import deprecation 1012 13 # XXX with 2.6 we could test warnings 14 # http://docs.python.org/library/warnings.html#testing-warnings 15 # instead we just make sure it does not crash 20 24 return any_func25 2931 any_func = deprecation.deprecated()(self.mk_func()) 32 any_func() 33 any_func = deprecation.deprecated('message')(self.mk_func()) 34 any_func()35 40 any_func() 41 42 @deprecation.deprecated() 43 def any_func(): 44 pass 45 any_func() 46 47 @deprecation.deprecated('message') 48 def any_func(): 49 pass 50 any_func() 5153 # this test needs l.c.test.__init__ 54 module = 'logilab.common.test.unittest_deprecation' 55 any_func = deprecation.moved(module, 'moving_target') 56 any_func()57 58 if __name__ == '__main__': 59 unittest_main() 60
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Dec 27 17:18:52 2009 | http://epydoc.sourceforge.net |