FairShip
Loading...
Searching...
No Matches
conftest.py
Go to the documentation of this file.
1
# SPDX-License-Identifier: LGPL-3.0-or-later
2
# SPDX-FileCopyrightText: Copyright CERN for the benefit of the SHiP Collaboration
3
4
import
pytest
5
6
7
# Session scope: loading libShipData a second time in one process crashes in
8
# ROOT 6.40, so every test module that needs it has to share this one load.
9
@pytest.fixture(scope="session")
10
def
root_with_shipdata
():
11
ROOT = pytest.importorskip(
"ROOT"
)
12
if
ROOT.gSystem.Load(
"libShipData"
) < 0:
13
pytest.skip(
"libShipData not available"
)
14
return
ROOT
15
16
17
# libCaloScoringPlane links libShipData. Request root_with_shipdata first so
18
# that libShipData is loaded by that one fixture and not again later.
19
@pytest.fixture(scope="session")
20
def
root_with_calo_scoring_plane
(root_with_shipdata):
21
ROOT = root_with_shipdata
22
if
ROOT.gSystem.Load(
"libCaloScoringPlane"
) < 0:
23
pytest.skip(
"libCaloScoringPlane not available"
)
24
return
ROOT
conftest.root_with_calo_scoring_plane
root_with_calo_scoring_plane(root_with_shipdata)
Definition
conftest.py:20
conftest.root_with_shipdata
root_with_shipdata()
Definition
conftest.py:10
tests
conftest.py
Generated by
Doxygen
1.15.0