Skip to content
Snippets Groups Projects

fix skip test if file not present, for 24.0

Merged Tadej Novak requested to merge cherry-pick-d6d150a8 into 24.0
1 file
+ 7
3
Compare changes
  • Side-by-side
  • Inline
@@ -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):
Loading