Skip to content
Snippets Groups Projects
Commit d6d150a8 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'fix_egammaLayerRecalibTool_test_file_not_found' into 'main'

fix skip test if file not present

Closes ATLASRECTS-7925

See merge request atlas/athena!69446
parents c61daa03 53b87782
No related branches found
No related tags found
No related merge requests found
......@@ -248,11 +248,15 @@ class TestLayer(unittest.TestCase):
def is_file_readable(path):
f = ROOT.TFile.Open(path, "READ")
return bool(f)
try:
f = ROOT.TFile.Open(path, "READ")
except OSError:
return False
return True
filename = 'root://eosatlas.cern.ch//eos/atlas/user/t/turra/user.blenzi.4956574.EXT0._000001.AOD.pool.root'
from AthenaConfiguration.TestDefaults import defaultTestFiles
filename = defaultTestFiles.AOD_RUN2_MC[0]
@unittest.skipIf(not is_file_readable(filename),
"input file not available")
class TestLayerxAOD(unittest.TestCase):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment