testinggtk r144 - trunk/tests



Author: bjornl
Date: Fri Jun 20 17:53:42 2008
New Revision: 144
URL: http://svn.gnome.org/viewvc/testinggtk?rev=144&view=rev

Log:
Don't use the functools module which is not available on python 2.4

Modified:
   trunk/tests/utils.py

Modified: trunk/tests/utils.py
==============================================================================
--- trunk/tests/utils.py	(original)
+++ trunk/tests/utils.py	Fri Jun 20 17:53:42 2008
@@ -1,7 +1,6 @@
 '''
 Useful utils usable under unit testing. 
 '''
-import functools
 import gtk
 import StringIO
 import sys
@@ -46,11 +45,11 @@
 
     :param func: test function to decorate               
     '''
-    @functools.wraps(func)
     def wrapper():
         wc.push_stderr()
         func()
         wc.pop_stderr_and_pass_warnings()
+    wrapper.__module__ = func.__module__
     return wrapper
 
 def fail_on_warnings(func):
@@ -66,11 +65,11 @@
 
     :param func: test function to decorate
     '''
-    @functools.wraps(func)
-    def wrapper(*args, **kwargs):
+    def wrapper():
         wc.push_stderr()
         func(*args, **kwargs)
         wc.pop_stderr_and_fail_warnings()
+    wrapper.__module__ = func.__module__
     return wrapper
     
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]