Commit a72ebc4f authored by Cory Quammen's avatar Cory Quammen Committed by Kitware Robot

Merge topic 'xml-time-series-test'

7e8272af Added test to ensure timesteps in XMLs can be read.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: T.J. Corona's avatarT.J. Corona <tj.corona@kitware.com>
Merge-request: !5019
parents b1dffbe3 7e8272af
vtk_add_test_python(
TestCellArray.py,NO_DATA,NO_VALID,NO_RT
TestEmptyXML.py,NO_DATA,NO_VALID,NO_RT
TestReadXMLUnstructuredGridWithTime.py,NO_VALID,NO_RT
TestXMLMultiBlock.py,NO_DATA,NO_VALID,NO_RT
TestXMLTimeInField.py,NO_DATA,NO_VALID,NO_RT
TestXMLImageDataIO.py
......
#!/usr/bin/env python
# Test reading of XML file with timesteps
import vtk.vtkIOXML
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
reader = vtk.vtkIOXML.vtkXMLUnstructuredGridReader()
reader.SetFileName(VTK_DATA_ROOT + "/Data/cube-with-time.vtu")
reader.Update()
# Ensure the reader identifies the timesteps in the file
assert reader.GetNumberOfTimeSteps() == 8
2fa0dec5c2c558dc49b037f3f1a0e18966e4411ca389bba32990b9ce10c2dbfd406d98da867b3beb3151135c4e990a4c0229aef68ef4b1570bda4e856e7b13dd
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment