Package: deap / 1.0.2.post2-6

0002-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
53
54
55
56
57
58
59
60
61
62
63
From f03fa535f3bdced1b52125a6b994b9be4092e996 Mon Sep 17 00:00:00 2001
From: Daniel Stender <debian@danielstener.com>
Date: Fri, 16 Oct 2015 19:30:13 +0200
Subject: fix-tests

 make tests run tree independently, removed unused import (cherry
 picked from repo), disabled defective stuff, see
 http://groups.google.com/forum/#!topic/deap-users/nOyiGlm38Zw
 Forwarded: not-needed
---
 deap/tests/test_logbook.py |  2 +-
 deap/tests/test_pickle.py  | 13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/deap/tests/test_logbook.py b/deap/tests/test_logbook.py
index f0238fd..b5f2834 100644
--- a/deap/tests/test_logbook.py
+++ b/deap/tests/test_logbook.py
@@ -3,7 +3,7 @@ import unittest
 
 sys.path.append("..")
 
-import tools
+from deap import tools
 
 class LogbookTest(unittest.TestCase):
 
diff --git a/deap/tests/test_pickle.py b/deap/tests/test_pickle.py
index 696b4db..0f808ab 100644
--- a/deap/tests/test_pickle.py
+++ b/deap/tests/test_pickle.py
@@ -4,16 +4,15 @@ import unittest
 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 @@ class Pickling(unittest.TestCase):
         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)