[yoda-svn] yoda: Python 3 compaible tests

YODA Mercurial yoda at projects.hepforge.org
Fri Nov 17 10:45:01 GMT 2017


details:   https://yoda.hepforge.org/hg/yoda/rev/978bd50d80af
branches:  
changeset: 1429:978bd50d80af
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Fri Nov 17 10:40:30 2017 +0000
description:
Python 3 compaible tests

diffs (truncated from 366 to 50 lines):

--- a/pyext/yoda/axis.pyx	Fri Nov 17 10:05:03 2017 +0000
+++ b/pyext/yoda/axis.pyx	Fri Nov 17 10:40:30 2017 +0000
@@ -9,7 +9,7 @@
 from libcpp.map cimport map
 
 # Pure python imports
-from itertools import repeat, imap
+from itertools import repeat
 from operator import attrgetter
 
 from yoda.core import (Dbn1D, Dbn2D, Dbn3D,
--- a/pyext/yoda/core.pyx	Fri Nov 17 10:05:03 2017 +0000
+++ b/pyext/yoda/core.pyx	Fri Nov 17 10:40:30 2017 +0000
@@ -13,7 +13,7 @@
 import yoda.util as util
 
 ## Pure Python imports
-from itertools import repeat, imap
+from itertools import repeat
 from operator import attrgetter
 
 def version():
--- a/pyext/yoda/include/Histo1D.pyx	Fri Nov 17 10:05:03 2017 +0000
+++ b/pyext/yoda/include/Histo1D.pyx	Fri Nov 17 10:40:30 2017 +0000
@@ -256,10 +256,10 @@
             self.h1ptr().addBins(cedges)
 
     def __addBins_bins(self, bins):
-        self.__addBins_tuples(imap(attrgetter('xEdges'), bins))
+        self.__addBins_tuples([ b.xEdges for b in bins ])
 
     def __addBins_points(self, points):
-        self.__addBins_tuples(imap(attrgetter('xWidth'), points))
+        self.__addBins_tuples([ p.xWidth for p in points ])
 
     def __addBins_tuples(self, tuples):
         cdef double a, b
--- a/tests/Makefile.am	Fri Nov 17 10:05:03 2017 +0000
+++ b/tests/Makefile.am	Fri Nov 17 10:40:30 2017 +0000
@@ -108,7 +108,6 @@
 ### when /usr/bin/env is called 
 ### (same for any other app in /usr/bin)
 ###
-if ! WITH_OSX
 TESTS += \
   pytest-unit \
   pytest-counter \
@@ -123,7 +122,6 @@
   pytest-iofilter \
   pytest-operators \


More information about the yoda-svn mailing list