(datadir)
| 12 | VTK_DATA_ROOT = testing.GetDataRoot() |
| 13 | |
| 14 | def Test1(datadir): |
| 15 | reader = vtkXMLUnstructuredGridReader() |
| 16 | reader.SetFileName(datadir + "/Data/quadraticTetra01.vtu") |
| 17 | reader.UpdateInformation(); |
| 18 | reader.GetPointDataArraySelection().EnableAllArrays() |
| 19 | reader.GetCellDataArraySelection().EnableAllArrays() |
| 20 | |
| 21 | f = vtkIntegrateAttributes() |
| 22 | f.SetInputConnection(reader.GetOutputPort()) |
| 23 | f.Update() |
| 24 | |
| 25 | result = f.GetOutputDataObject(0) |
| 26 | val = result.GetPointData().GetArray("scalars").GetValue(0) |
| 27 | assert (val > 0.0162 and val < 0.01621) |
| 28 | |
| 29 | val = result.GetCellData().GetArray("Volume").GetValue(0) |
| 30 | assert (val > 0.128 and val < 0.1284) |
| 31 | |
| 32 | |
| 33 | def Test2(datadir): |
no test coverage detected