Commit ce93f592 authored by Kenneth Leiter's avatar Kenneth Leiter
Browse files

ENH: Enable python test for XdmfSet.

parent b1686a97
......@@ -14,21 +14,25 @@ ADD_TEST_PYTHON_PYTHONPATH("")
# have extra arguments (ie: ADD_TEST_PYTHON(testname inputfile))
# Read UsePythonTest.cmake for more information
# -----------------------
ADD_TEST_PYTHON(TestXdmfEquals)
ADD_TEST_PYTHON(TestXdmfHDF5Writer)
ADD_TEST_PYTHON(TestXdmfSet)
ADD_TEST_PYTHON(TestXdmfWriter)
ADD_TEST_PYTHON(TestXdmfEquals)
# Add any python cleanup here:
# Note: We don't want to use a foreach loop to test the files incase we
# have multiple files (ie: CLEAN_TEST_PYTHON(testname outputfile1 ...))
# Read UseCxxTest.cmake for more information
# ---------------------------------------
CLEAN_TEST_PYTHON(TestXdmfEquals)
CLEAN_TEST_PYTHON(TestXdmfHDF5Writer
hdf5WriterPythonTest.h5)
CLEAN_TEST_PYTHON(TestXdmfSet)
CLEAN_TEST_PYTHON(TestXdmfWriter
output.h5
output.xmf)
CLEAN_TEST_PYTHON(TestXdmfEquals)
# Add a custom target for all python tests
# Note: ${TARGETS} is set in ADD_TEST_PYTHON
......
......@@ -4,12 +4,13 @@ if __name__ == "__main__":
set = XdmfSet.New()
assert(set.getName() == "")
assert(not set.isInitialized())
set.setName("foo")
assert(set.getName() == "foo")
assert(set.getType() == XdmfSetType.NoSetType())
set.setType(XdmfSetType.Node())
assert(set.getType() == XdmfSetType.Node())
assert(set.getSize() == 0)
set.copyValueAsInt32(0, 1)
set.insertValueAsInt32(0, 1)
assert(set.getSize() == 1)
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