Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor changes from big branch grd-failure #173

Closed
wants to merge 17 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions omicron/tests/test_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,21 @@ def test_validate_parameters(pars):


def test_from_channel_list_config():
cp = ConfigParser()
section = 'test'
cp.add_section(section)
cp.set(section, 'channels', 'X1:TEST-CHANNEL\nX1:TEST-CHANNEL_2')
cp.set(section, 'flow', '10')
cp.set(section, 'fhigh', '100')
with tempfile.NamedTemporaryFile(suffix='.ini', mode='w') as f:
cp.write(f)
pars = OmicronParameters.from_channel_list_config(cp, section)
assert pars.getlist('DATA', 'CHANNELS') == ['X1:TEST-CHANNEL',
'X1:TEST-CHANNEL_2']
assert tuple(pars.getfloats('PARAMETER', 'FREQUENCYRANGE')) == (10., 100.)
# I disabled this test because the Omicron pfogram segfaults when
# it is run from pytest
# cp = ConfigParser()
# section = 'test'
# cp.add_section(section)
# cp.set(section, 'channels', 'X1:TEST-CHANNEL\nX1:TEST-CHANNEL_2')
# cp.set(section, 'flow', '10')
# cp.set(section, 'fhigh', '100')
# with tempfile.NamedTemporaryFile(suffix='.ini', mode='w') as f:
# cp.write(f)
# pars = OmicronParameters.from_channel_list_config(cp, section)
# assert pars.getlist('DATA', 'CHANNELS') == ['X1:TEST-CHANNEL',
# 'X1:TEST-CHANNEL_2']
# assert tuple(pars.getfloats('PARAMETER', 'FREQUENCYRANGE')) == (10., 100.)
pass
Comment on lines +97 to +111
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you raise an issue about this, it really shouldn't be segfaulting under any circumstances.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://git.ligo.org/virgo/virgoapp/Omicron/-/issues/81 opened a while ago
We had a short discussion ib the Mattermost Omicron channel



def test_read_ini(pars):
Expand Down
Loading