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

Method testThird

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

Source from the content-addressed store, hash-verified

79 return
80
81 def testThird(self):
82 r = vtkIOFides.vtkFidesReader()
83 r.SetFileName(VTK_DATA_ROOT + "/Data/vtk-uns-grid-2.json")
84 r.SetDataSourcePath("source",
85 VTK_DATA_ROOT + "/Data/tris-blocks-time.bp")
86 r.UpdateInformation()
87 r.PrepareNextStep()
88 r.Update()
89 r.PrepareNextStep()
90 r.Update()
91 r.PrepareNextStep()
92 r.Update()
93
94 pdsc = r.GetOutputDataObject(0)
95 self.assertTrue(isinstance(pdsc, vtkPartitionedDataSetCollection))
96 pds = pdsc.GetPartitionedDataSet(0)
97 nParts = pds.GetNumberOfPartitions()
98 self.assertEqual(nParts, 4)
99
100 ds = pds.GetPartition(0)
101 self.assertEqual(ds.GetNumberOfCells(), 24)
102 self.assertEqual(ds.GetNumberOfPoints(), 20)
103 self.assertEqual(ds.GetPointData().GetNumberOfArrays(), 2)
104 self.assertEqual(ds.GetPointData().GetArray(0).GetName(), "dpot")
105 self.assertEqual(ds.GetClassName(), "vtkUnstructuredGrid")
106 return
107
108 def testFourth(self):
109 # This test is based on selecting a BP file that contains some attributes that helps Fides

Callers

nothing calls this directly

Calls 15

vtkFidesReaderMethod · 0.80
SetDataSourcePathMethod · 0.80
GetPartitionedDataSetMethod · 0.80
SetFileNameMethod · 0.45
UpdateInformationMethod · 0.45
PrepareNextStepMethod · 0.45
UpdateMethod · 0.45
GetOutputDataObjectMethod · 0.45
GetNumberOfPartitionsMethod · 0.45
GetPartitionMethod · 0.45
GetNumberOfCellsMethod · 0.45
GetNumberOfPointsMethod · 0.45

Tested by

no test coverage detected