Package: freecad / 0.14.3702+dfsg-3

unittest_to_stdout.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Description: move output from unittest into stdout
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2014-07-22

--- freecad-0.14.3702.orig/src/Mod/Test/TestApp.py
+++ freecad-0.14.3702/src/Mod/Test/TestApp.py
@@ -22,7 +22,7 @@
 #*   Juergen Riegel 2002                                                   *
 #***************************************************************************/
 
-import FreeCAD, os, unittest
+import FreeCAD, os, unittest, sys
 
 	
 #---------------------------------------------------------------------------
@@ -58,7 +58,7 @@ def All():
     
 def TestText(s):
     s = unittest.defaultTestLoader.loadTestsFromName(s)
-    r = unittest.TextTestRunner()
+    r = unittest.TextTestRunner(stream=sys.stdout,verbosity=2)
     r.run(s)
 
 def Test(s):
--- freecad-0.14.3702.orig/src/Mod/Test/TestGui.py
+++ freecad-0.14.3702/src/Mod/Test/TestGui.py
@@ -31,6 +31,7 @@
 import FreeCAD,FreeCADGui
 # import the App Test module
 import TestApp               #Test as Module name not possible
+import sys
 
 #---------------------------------------------------------------------------
 # define the Commands of the Test Application module
@@ -97,7 +98,7 @@ class TestAllTextCmd:
     "Test all commando object"
     def Activated(self):
         import unittest, TestApp
-        unittest.TextTestRunner().run(unittest.defaultTestLoader.loadTestsFromName("TestApp.All"))
+        unittest.TextTestRunner(stream=sys.stdout,verbosity=2).run(unittest.defaultTestLoader.loadTestsFromName("TestApp.All"))
 
     def GetResources(self):
         return {'Pixmap'  : 'Std_Tool1',