Skip to content

Commit

Permalink
Move tests to more appropriate place
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Sep 10, 2024
1 parent 9167bc0 commit deae73b
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 27 deletions.
21 changes: 21 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,25 @@ set_tests_properties(create_complete_file_rntuple PROPERTIES
SKIP_REGULAR_EXPRESSION "The RNTuple writer from podio is not available but was requested"
)

add_test(NAME check_complete_file COMMAND pytest --inputfile=${CMAKE_BINARY_DIR}/test/edm4hep_example.root -v)
set_test_env(check_complete_file)
set_tests_properties(
check_complete_file

PROPERTIES
DEPENDS create_complete_file
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_test(NAME check_complete_file_rntuple COMMAND pytest --inputfile=${CMAKE_BINARY_DIR}/test/edm4hep_example_rntuple.root -v)
set_test_env(check_complete_file_rntuple)
set_tests_properties(
check_complete_file_rntuple

PROPERTIES
DEPENDS create_complete_file_rntuple
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

add_executable(write_events write_events.cc)
target_include_directories(write_events PUBLIC ${PROJECT_SOURCE_DIR}/edm4hep )
target_link_libraries(write_events edm4hep podio::podioRootIO)
Expand Down Expand Up @@ -96,4 +115,6 @@ endif()
add_subdirectory(utils)
add_subdirectory(tools)



add_subdirectory(backwards_compat)
19 changes: 0 additions & 19 deletions test/backwards_compat/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions test/backwards_compat/conftest.py

This file was deleted.

8 changes: 8 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env python3
"""pytest config module to make passing of input file name possible"""


def pytest_addoption(parser):
"""Hook to add an inputfile argument to pytest for checking EDM4hep file
contents"""
parser.addoption("--inputfile", action="store")
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""Script that can be used to check whether the file that has been created by
scripts/createEDM4hepFile.py has the expected contents
"""Pytest module that can be used to check whether the file that has been
created by scripts/createEDM4hepFile.py has the expected contents
"""

import os
Expand Down

0 comments on commit deae73b

Please sign in to comment.