MCPcopy Create free account
hub / github.com/Kitware/VTK / testSecond

Method testSecond

IO/Fides/Testing/Python/TestFidesBasic.py:50–79  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48 return
49
50 def testSecond(self):
51 r = vtkIOFides.vtkFidesReader()
52 r.ParseDataModel(VTK_DATA_ROOT + "/Data/vtk-uns-grid-2.json")
53 r.SetDataSourcePath("source",
54 VTK_DATA_ROOT + "/Data/tris-blocks-time.bp")
55 r.UpdateInformation()
56 self.assertTrue(r.GetOutputInformation(0).Has(
57 vtkStreamingDemandDrivenPipeline.TIME_STEPS()))
58 nsteps = r.GetOutputInformation(0).Length(vtkStreamingDemandDrivenPipeline.TIME_STEPS())
59 self.assertEqual(nsteps, 5)
60 for i in range(nsteps):
61 self.assertEqual(r.GetOutputInformation(0).
62 Get(vtkStreamingDemandDrivenPipeline.TIME_STEPS(),i), i)
63 pds = r.GetPointDataArraySelection()
64 pds.DisableAllArrays()
65 pds.EnableArray("dpot2")
66 r.Update()
67
68 pdsc = r.GetOutputDataObject(0)
69 self.assertTrue(isinstance(pdsc, vtkPartitionedDataSetCollection))
70 pds = pdsc.GetPartitionedDataSet(0)
71 nParts = pds.GetNumberOfPartitions()
72 self.assertEqual(nParts, 4)
73
74 ds = pds.GetPartition(0)
75 self.assertEqual(ds.GetNumberOfCells(), 24)
76 self.assertEqual(ds.GetNumberOfPoints(), 20)
77 self.assertEqual(ds.GetPointData().GetNumberOfArrays(), 1)
78 self.assertEqual(ds.GetPointData().GetArray(0).GetName(), "dpot2")
79 return
80
81 def testThird(self):
82 r = vtkIOFides.vtkFidesReader()

Callers

nothing calls this directly

Calls 15

vtkFidesReaderMethod · 0.80
ParseDataModelMethod · 0.80
SetDataSourcePathMethod · 0.80
DisableAllArraysMethod · 0.80
EnableArrayMethod · 0.80
GetPartitionedDataSetMethod · 0.80
rangeClass · 0.50
UpdateInformationMethod · 0.45
HasMethod · 0.45
GetOutputInformationMethod · 0.45
LengthMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected