# Tests that can run without external data
set(smtkAttributePythonTests
  associationTest
  attributeAutoNamingTest
  attributeFindItemTest
  attributeReferencingTest
  basicAttributeDefinitionTest
  basicAttributeDerivationTest
  basicAttributeTest
  categoryTest
  expressionTest
  expressionTest2
)

# DateTime classes only wrapped by pybind
if (SMTK_USE_PYBIND11)
  list(APPEND smtkAttributePythonTests
    datetimeitemTest
    datetimezonepairTest
  )
endif()

foreach(test ${smtkAttributePythonTests})
  smtk_add_test_python(${test}Py ${test}.py)
endforeach()


# Additional tests that require SMTK_DATA_DIR
set(smtkAttributePythonDataTests
  copyDefinitionTest
  copyAttributeTest
)
set(smtkAttributePythonNewDataTests
  attributeItemByPath
)

if (SMTK_DATA_DIR AND EXISTS ${SMTK_DATA_DIR}/cmb-testing-data.marker)
  smtk_add_test_python(basicAttributeXMLWriterTestPy basicAttributeXMLWriterTest.py dummypy.sbi)
  smtk_add_test_python(definitionDefaultValueTestPy definitionDefaultValueTest.py dummy.sbt)

  foreach (test ${smtkAttributePythonDataTests})
    smtk_add_test_python(${test}Py ${test}.py
      ${SMTK_DATA_DIR})
  endforeach()
  # New-style tests that use smtk.testing.TestCase
  foreach (test ${smtkAttributePythonNewDataTests})
    smtk_add_test_python(${test}Py ${test}.py
      -D ${SMTK_DATA_DIR})
  endforeach()
endif()
