From: Gilles DAVID Date: Fri, 31 Mar 2017 08:41:34 +0000 (+0200) Subject: Python3: tests X-Git-Tag: V9_0_0~2^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6a7dd43e616861ed9cc7e6da99318e3f72edd319;p=plugins%2Fblsurfplugin.git Python3: tests --- diff --git a/tests/test_cadsurf_multithread.py b/tests/test_cadsurf_multithread.py index 62e8f0a..d049b90 100644 --- a/tests/test_cadsurf_multithread.py +++ b/tests/test_cadsurf_multithread.py @@ -57,7 +57,7 @@ time1 = time.time() time_multithread = time1-time0 -print "Time in 4 proc: %.3s"%(time_multithread) +print("Time in 4 proc: %.3s"%(time_multithread)) Mesh_2 = smesh.Mesh(flight_solid_brep_1) MG_CADSurf = Mesh_2.Triangle(algo=smeshBuilder.MG_CADSurf) @@ -75,7 +75,7 @@ isDone = Mesh_2.Compute() time3 = time.time() time_singlethread = time3-time2 -print "Time in 1 proc: %.3s"%(time_singlethread) +print("Time in 1 proc: %.3s"%(time_singlethread)) assert time_multithread < time_singlethread/2. diff --git a/tests/test_periodicity_reflexion_2D_precad.py b/tests/test_periodicity_reflexion_2D_precad.py index f8674fe..11d21be 100644 --- a/tests/test_periodicity_reflexion_2D_precad.py +++ b/tests/test_periodicity_reflexion_2D_precad.py @@ -115,7 +115,7 @@ def checkProjection(gr, mesh_translated, tol=1e-7): non_coincident_nodes = list(set(mesh_nodes) - set(coincident_nodes)) mesh_check.MakeGroupByIds("non_coincident_nodes", SMESH.NODE, non_coincident_nodes) #raise Exception("Projection failed for %s"%name) - print "Projection failed for %s"%name + print("Projection failed for %s"%name) checkProjection(gr_right, bottom_rotated) diff --git a/tests/test_proximity.py b/tests/test_proximity.py index a649832..6b78343 100644 --- a/tests/test_proximity.py +++ b/tests/test_proximity.py @@ -80,7 +80,7 @@ gr_mesh_spheres = Mesh_1.Group(gr_spheres_faces) # Check the minimal area of the box faces to check the proximity min_area, max_area = Mesh_1.GetMinMax(SMESH.FT_Area, gr_mesh_box) -print "min_area: ", min_area +print("min_area: ", min_area) if min_area > 1.5: raise Exception("Wrong minimal area on box. Proximity has not worked.") diff --git a/tests/test_remove_tiny_edges.py b/tests/test_remove_tiny_edges.py index 1e863ee..af91fb4 100644 --- a/tests/test_remove_tiny_edges.py +++ b/tests/test_remove_tiny_edges.py @@ -101,7 +101,7 @@ for elem in elems: min_length = min(edges_length) x1, y1, z1 = Mesh.GetNodeXYZ(node) -print min_length +print(min_length) if min_length