Package: deap / 1.0.1-3+deb8u1

fix-tests.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
44
45
46
47
48
49
50
51
52
Description: make tests run
 fix tests to run tree independently, removed unused import (cherry
 picked from repo), disabled defective stuff, see
 http://groups.google.com/forum/#!topic/deap-users/nOyiGlm38Zw
Author: Daniel Stender <debian@danielstener.com>
Forwarded: no-needed
Last-Update: 2014-10-09
--- a/deap/tests/test_pickle.py
+++ b/deap/tests/test_pickle.py
@@ -4,16 +4,15 @@
 import array
 import pickle
 import operator
-from test import test_support
 
 sys.path.append("..")
 
 import numpy
 
-import creator
-import base
-import gp
-import tools
+from deap import creator
+from deap import base
+from deap import gp
+from deap import tools
 
 def func():
     return "True"
@@ -57,8 +56,8 @@
         ind.fitness.values = (1.0,)
         ind_s = pickle.dumps(ind)
         ind_l = pickle.loads(ind_s)
-        msg =  "Unpickled individual %s != pickled individual %s" % (str(ind), str(ind_l))
-        self.failUnlessEqual(ind, ind_l, msg)
+        # msg =  "Unpickled individual %s != pickled individual %s" % (str(ind), str(ind_l))
+        self.failUnlessEqual(ind, ind_l)
         msg =  "Unpickled fitness %s != pickled fitness %s" % (str(ind.fitness), str(ind_l.fitness))
         self.failUnlessEqual(ind.fitness, ind_l.fitness, msg)
     
--- a/deap/tests/test_logbook.py
+++ b/deap/tests/test_logbook.py
@@ -3,7 +3,7 @@
 
 sys.path.append("..")
 
-import tools
+from deap import tools
 
 class LogbookTest(unittest.TestCase):