Skip to content

Commit

Permalink
moved python bindings tests
Browse files Browse the repository at this point in the history
cleaned unnecessary import magic
  • Loading branch information
m-fila committed Feb 23, 2024
1 parent 1c97d6b commit 7afd709
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
12 changes: 1 addition & 11 deletions tests/unittests/unittests.py → python/podio/test_CodeGen.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@

import unittest
import ROOT

res = ROOT.gSystem.Load("libTestDataModel.so")
if res < 0:
raise RuntimeError("Failed to load libTestDataModel.so")

from ROOT import MutableExampleMC # pylint: disable=wrong-import-position # noqa: E402
from ROOT import ExampleMCCollection # pylint: disable=wrong-import-position # noqa: E402
from ROOT import ExampleMCCollection, MutableExampleMC


class ObjectConversionsTest(unittest.TestCase):
Expand Down Expand Up @@ -37,7 +31,3 @@ def test_add(self):
self.assertEqual(len(daughter_particle.parents()), 0)
daughter_particle.addparents(parent_particle)
self.assertEqual(len(daughter_particle.parents()), 1)


if __name__ == "__main__":
unittest.main()
4 changes: 0 additions & 4 deletions tests/unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,3 @@ else()
PODIO_SIOBLOCK_PATH=${CMAKE_CURRENT_BINARY_DIR}
)
endif()

add_test(NAME unittest.py COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/unittests.py)
PODIO_SET_TEST_ENV(unittest.py)
set_tests_properties(unittest.py PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)

0 comments on commit 7afd709

Please sign in to comment.