[Python-modules-commits] [deap] 02/04: fix-tests
Daniel Stender
danstender-guest at moszumanska.debian.org
Sun Mar 20 12:57:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
danstender-guest pushed a commit to branch master
in repository deap.
commit f03fa535f3bdced1b52125a6b994b9be4092e996
Author: Daniel Stender <debian at danielstener.com>
Date: Fri Oct 16 19:30:13 2015 +0200
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)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/deap.git
More information about the Python-modules-commits
mailing list