(self)
| 106 | return |
| 107 | |
| 108 | def testFourth(self): |
| 109 | # This test is based on selecting a BP file that contains some attributes that helps Fides |
| 110 | # generate a data model, instead of the user providing the data model. |
| 111 | r = vtkIOFides.vtkFidesReader() |
| 112 | r.SetFileName(VTK_DATA_ROOT + "/Data/cartesian-attr.bp") |
| 113 | r.UpdateInformation() |
| 114 | self.assertTrue(r.GetOutputInformation(0).Has( |
| 115 | vtkStreamingDemandDrivenPipeline.TIME_STEPS())) |
| 116 | nsteps = r.GetOutputInformation(0).Length(vtkStreamingDemandDrivenPipeline.TIME_STEPS()) |
| 117 | self.assertEqual(nsteps, 1) |
| 118 | for i in range(nsteps): |
| 119 | self.assertEqual(r.GetOutputInformation(0).Get( |
| 120 | vtkStreamingDemandDrivenPipeline.TIME_STEPS(),i), i) |
| 121 | pds = r.GetPointDataArraySelection() |
| 122 | pds.DisableAllArrays() |
| 123 | pds.EnableArray("density") |
| 124 | r.Update() |
| 125 | |
| 126 | pdsc = r.GetOutputDataObject(0) |
| 127 | self.assertTrue(isinstance(pdsc, vtkPartitionedDataSetCollection)) |
| 128 | pds = pdsc.GetPartitionedDataSet(0) |
| 129 | nParts = pds.GetNumberOfPartitions() |
| 130 | self.assertEqual(nParts, 1) |
| 131 | |
| 132 | ds = pds.GetPartition(0) |
| 133 | self.assertEqual(ds.GetNumberOfCells(), 440) |
| 134 | self.assertEqual(ds.GetNumberOfPoints(), 648) |
| 135 | self.assertEqual(ds.GetPointData().GetNumberOfArrays(), 1) |
| 136 | self.assertEqual(ds.GetPointData().GetArray(0).GetName(), "density") |
| 137 | return |
| 138 | |
| 139 | def testFifth(self): |
| 140 | # This test is based on selecting a BP file that contains a group of meshes. |
nothing calls this directly
no test coverage detected