diff --git a/cmake/podioTest.cmake b/cmake/podioTest.cmake index f6775632c..01aa86196 100644 --- a/cmake/podioTest.cmake +++ b/cmake/podioTest.cmake @@ -14,6 +14,7 @@ function(PODIO_SET_TEST_ENV test) PODIO_USE_CLANG_FORMAT=${PODIO_USE_CLANG_FORMAT} PODIO_BASE=${PROJECT_SOURCE_DIR} ENABLE_SIO=${ENABLE_SIO} + PODIO_TEST_INPUT_DATA_DIR=${PODIO_TEST_INPUT_DATA_DIR} ) endfunction() diff --git a/python/podio/test_ReaderRoot.py b/python/podio/test_ReaderRoot.py index a7bdf98f8..7c956f24a 100644 --- a/python/podio/test_ReaderRoot.py +++ b/python/podio/test_ReaderRoot.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 """Python unit tests for the ROOT backend (using Frames)""" +import os import unittest from test_Reader import ReaderTestCaseMixin, LegacyReaderTestCaseMixin # pylint: disable=import-error @@ -19,4 +20,4 @@ class RootLegacyReaderTestCase(LegacyReaderTestCaseMixin, unittest.TestCase): """Test cases for the legacy root input files and reader.""" def setUp(self): """Setup a reader, reading from the example files""" - self.reader = LegacyReader('root_io/example.root') + self.reader = LegacyReader(os.path.join(os.environ["PODIO_TEST_INPUT_DATA_DIR"], "v00-16-06", "example.root")) diff --git a/python/podio/test_ReaderSio.py b/python/podio/test_ReaderSio.py index ef7b86b6b..d8db8b9bf 100644 --- a/python/podio/test_ReaderSio.py +++ b/python/podio/test_ReaderSio.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 """Python unit tests for the SIO backend (using Frames)""" +import os import unittest from test_Reader import ReaderTestCaseMixin, LegacyReaderTestCaseMixin # pylint: disable=import-error @@ -22,4 +23,4 @@ class SIOLegacyReaderTestCase(LegacyReaderTestCaseMixin, unittest.TestCase): def setUp(self): """Setup a reader, reading from the example files""" from podio.sio_io import LegacyReader # pylint: disable=import-outside-toplevel - self.reader = LegacyReader('sio_io/example.sio') + self.reader = LegacyReader(os.path.join(os.environ["PODIO_TEST_INPUT_DATA_DIR"], "v00-16-06", "example.sio"))