From 47e9279e9c062285138830c2ce555bedc3db13e7 Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Thu, 20 Apr 2017 11:22:18 +0200 Subject: [PATCH] [PY3] Suite suppression six --- src/MEDCoupling_Swig/MEDCouplingBasicsTest3.py | 6 ++---- src/MEDCoupling_Swig/MEDCouplingBasicsTest4.py | 1 - src/MEDCoupling_Swig/MEDCouplingBasicsTest5.py | 18 ++++++++---------- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest3.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest3.py index e715b39ed..a73397795 100644 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest3.py +++ b/src/MEDCoupling_Swig/MEDCouplingBasicsTest3.py @@ -32,8 +32,6 @@ from math import pi,e,sqrt,cos,sin from datetime import datetime from MEDCouplingDataForTest import MEDCouplingDataForTest import rlcompleter,readline # this line has to be here, to ensure a usability of MEDCoupling/MEDLoader. B4 removing it please notify to anthony.geay@cea.fr -import six -from six.moves import range class MEDCouplingBasicsTest3(unittest.TestCase): def testSwigGetItem1(self): @@ -502,7 +500,7 @@ class MEDCouplingBasicsTest3(unittest.TestCase): it2=da2.__iter__() i=0 for it in da: - pt = six.next(it2) + pt = next(it2) it[:]=pt pass self.assertTrue(da.isEqual(da2)) @@ -560,7 +558,7 @@ class MEDCouplingBasicsTest3(unittest.TestCase): it2=da2.__iter__() i=0 for it in da: - pt = six.next(it2) + pt = next(it2) it[:]=pt pass self.assertTrue(da.isEqual(da2,1e-12)) diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest4.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest4.py index a9203fc52..f02d3579a 100644 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest4.py +++ b/src/MEDCoupling_Swig/MEDCouplingBasicsTest4.py @@ -28,7 +28,6 @@ from datetime import datetime from MEDCouplingDataForTest import MEDCouplingDataForTest import rlcompleter,readline # this line has to be here, to ensure a usability of MEDCoupling/MEDLoader. B4 removing it please notify to anthony.geay@cea.fr from sys import platform -from six.moves import range def checkFreeMemory(size): """ diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest5.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest5.py index 17d82d5d9..c4f192053 100644 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest5.py +++ b/src/MEDCoupling_Swig/MEDCouplingBasicsTest5.py @@ -32,8 +32,6 @@ from math import pi,e,sqrt,cos,sin from datetime import datetime from MEDCouplingDataForTest import MEDCouplingDataForTest import rlcompleter,readline # this line has to be here, to ensure a usability of MEDCoupling/MEDLoader. B4 removing it please notify to anthony.geay@cea.fr -import six -from six.moves import range class MEDCouplingBasicsTest5(unittest.TestCase): def testSwig2FieldDoubleBuildSubPartRange1(self): @@ -2330,34 +2328,34 @@ class MEDCouplingBasicsTest5(unittest.TestCase): def testSwigBugOnUnpackingTuplesInDataArray1(self): inp=DataArrayDouble([(1,2,3),(4,5,6),(7,8,9),(10,11,12)]) it=inp.__iter__() - r = six.next(it) + r = next(it) self.assertRaises(StopIteration,r.__getitem__,4) self.assertEqual(len(r),3) a,b,c=r - r = six.next(it) + r = next(it) self.assertEqual(len(r),3) d,e,f=r - r = six.next(it) + r = next(it) self.assertEqual(len(r),3) g,h,i=r - r = six.next(it) + r = next(it) self.assertEqual(len(r),3) j,k,l=r self.assertTrue(inp.isEqual(DataArrayDouble([a,b,c,d,e,f,g,h,i,j,k,l],4,3),1e-12)) ######## inp=DataArrayInt([(1,2,3),(4,5,6),(7,8,9),(10,11,12)]) it=inp.__iter__() - r = six.next(it) + r = next(it) self.assertRaises(StopIteration,r.__getitem__,4) self.assertEqual(len(r),3) a,b,c=r - r = six.next(it) + r = next(it) self.assertEqual(len(r),3) d,e,f=r - r = six.next(it) + r = next(it) self.assertEqual(len(r),3) g,h,i=r - r = six.next(it) + r = next(it) self.assertEqual(len(r),3) j,k,l=r self.assertTrue(inp.isEqual(DataArrayInt([a,b,c,d,e,f,g,h,i,j,k,l],4,3))) -- 2.39.2