Skip to content

Commit

Permalink
Switch pyunittests to use downloaded legacy data
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Oct 12, 2023
1 parent 192baf6 commit 57fc758
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmake/podioTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
3 changes: 2 additions & 1 deletion python/podio/test_ReaderRoot.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"))
3 changes: 2 additions & 1 deletion python/podio/test_ReaderSio.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"))

0 comments on commit 57fc758

Please sign in to comment.