Skip to content

Commit

Permalink
cover tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kratsg committed Aug 10, 2022
1 parent bc38d98 commit 52f35e4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/pyhf/readxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,18 @@ def process_measurements(toplvl, other_parameter_configs=None):
lumi = float(x.attrib['Lumi'])
lumierr = lumi * float(x.attrib['LumiRelErr'])

measurement_name = x.attrib['Name']

poi = x.find('POI')
if poi is None:
raise RuntimeError(
f"Measurement {measurement_name} is missing POI specification"
)

result = {
'name': x.attrib['Name'],
'name': measurement_name,
'config': {
'poi': x.findall('POI')[0].text.strip(),
'poi': poi.text.strip() if poi.text else '',
'parameters': [
{
'name': 'lumi',
Expand Down

0 comments on commit 52f35e4

Please sign in to comment.