Commit 7e8272af authored by Cory Quammen's avatar Cory Quammen

Added test to ensure timesteps in XMLs can be read.

Hat tip to Simon Praetorius <Simon.Praetorius@tu-dresden.de> for
pointing out a regression in the XML readers and test data to use
in this test. See
https://www.vtk.org/pipermail/vtkusers/2016-September/096663.html.
parent b1dffbe3
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