]> SALOME platform Git repositories - tools/paravisaddons_common.git/commitdiff
Salome HOME
[EDF23711] : Activate test with time
authorAnthony Geay <anthony.geay@edf.fr>
Thu, 24 Jun 2021 08:05:20 +0000 (10:05 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Thu, 24 Jun 2021 08:05:20 +0000 (10:05 +0200)
src/ContactReader/Test/23711_with_time.py
src/ContactReader/Test/CTestTestfileInstall.cmake

index 31aa7397592f00e446a0856201992a12dcfc35eb..8e72ee76e10b8f68920678024708877d44722bd0 100644 (file)
@@ -12,13 +12,8 @@ anim = GetAnimationScene()
 tk = anim.TimeKeeper
 times = tk.TimestepValues
 MyAssert(times==[0.0,1.0,2.0])
-Show(cr)
-meshViewer = GetActiveView()
 # time step 0
-meshViewer.ViewTime = times[0]
-meshViewer.Representations[0].UpdatePipeline()
-Render()
-cr.UpdatePipeline()
+cr.UpdatePipeline(time = times[0])
 ds0 = servermanager.Fetch(cr)
 MyAssert([ds0.GetPointData().GetArrayName(i) for i in range(ds0.GetPointData().GetNumberOfArrays())]==["Resultante"])
 MyAssert(ds0.GetNumberOfPoints()%NB_OF_LINES_FOR_1TS == 0)
@@ -27,20 +22,14 @@ ts0 = numpy_support.vtk_to_numpy(ds0.GetPointData().GetAbstractArray(0))[::step]
 MyAssert(ts0.shape == (NB_OF_LINES_FOR_1TS,3))
 
 # time step 1
-meshViewer.ViewTime = times[1]
-meshViewer.Representations[0].UpdatePipeline()
-Render()
-cr.UpdatePipeline()
+cr.UpdatePipeline(time = times[1])
 ds0 = servermanager.Fetch(cr)
 ts1 = numpy_support.vtk_to_numpy(ds0.GetPointData().GetAbstractArray(0))[::step]
 MyAssert(not np.all(ts0==ts1))
 MyAssert(ts1.shape == (NB_OF_LINES_FOR_1TS,3))
 
 # time step 2
-meshViewer.ViewTime = times[2]
-meshViewer.Representations[0].UpdatePipeline()
-Render()
-cr.UpdatePipeline()
+cr.UpdatePipeline(time = times[2])
 ds0 = servermanager.Fetch(cr)
 ts2 = numpy_support.vtk_to_numpy(ds0.GetPointData().GetAbstractArray(0))[::step]
 MyAssert(ts2.shape == (NB_OF_LINES_FOR_1TS-1,3)) # ???? for TS == 2.0 Plot AS is missing !?
index a39ba5325eaa5d3ac9dd13a22746003214f239e4..9759cda2082cf0c88e0d50d750a5a1b1c5f54e58 100644 (file)
@@ -18,7 +18,7 @@
 #
 
 SET(TEST_NAMES
-#23711_with_time
+23711_with_time
 23711_without_time
 )