-
Notifications
You must be signed in to change notification settings - Fork 7
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
Changes from 15 commits
73ceb29
3798f20
ef93d47
ead6747
6b5403b
978cc76
da36cb4
3a2052f
9c9f35f
d7eb601
9d06142
4f0ab08
59840cc
e57e810
9d175ed
6167626
cc9348e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
||
|
||
def test_read_ini(pars): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
get_omicron_version
function, as far as I can tell, cannot raise aKeyError
under any circumstances, so this should be a replacement rather than an append:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, I'm not sure that we should be skipping this sort of error anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
omicron version
segfaults subprocess produces a runtime error.Other omicron functions work.