[Neo-report] r2562 vincent - /trunk/neo/tests/functional/__init__.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Dec 22 15:05:29 CET 2010


Author: vincent
Date: Wed Dec 22 15:05:29 2010
New Revision: 2562

Log:
Fix _exit implementation.

- add missing status parameter
- tabs are evil
- use sys.exit instead of raising KeyboarInterrupt (it raises SystemExit)

Modified:
    trunk/neo/tests/functional/__init__.py

Modified: trunk/neo/tests/functional/__init__.py
==============================================================================
--- trunk/neo/tests/functional/__init__.py [iso-8859-1] (original)
+++ trunk/neo/tests/functional/__init__.py [iso-8859-1] Wed Dec 22 15:05:29 2010
@@ -87,13 +87,9 @@ class NEOProcess(object):
             print 'Error executing %r.' % (command + ' ' + ' '.join(args), )
             self._exit(-1)
 
-    def _exit(self):
-	# KeyboardInterrupt is not intercepted by test runner (it is still
-	# above us in the stack), and we do want to exit.
-	# To avoid polluting test foreground output with induced
-	# traceback, replace stdout & stderr.
-	sys.stdout = sys.stderr = open('/dev/null', 'w')
-	raise KeyboardInterrupt
+    def _exit(self, status=0):
+        sys.stdout = sys.stderr = open('/dev/null', 'w')
+        sys.exit(status)
 
     def kill(self, sig=signal.SIGTERM):
         if self.pid:




More information about the Neo-report mailing list