forked from pool/python-ligo-lw
* Update to version 1.7.0. * Run tests as part of %check section (python3 and 64-bit only); include all Requires as BuildRequires, plus diffutils (for cmp), libxml2-tools (for xmllint), python3, and python-matplotlib. * Replace the use of "distutils.core" with "setuptools"; ligo.lw module is not found when the former is used (see https://git.ligo.org/kipp.cannon/python-ligo-lw/-/issues/16). * Add ligo-lw-segments-test-fix.patch to fix a test that randomly fails due to dictionary ordering being undefined (sent upstream). * Update URL: previous URL no longer accessible. * New Requires: python-tqdm. OBS-URL: https://build.opensuse.org/request/show/845213 OBS-URL: https://build.opensuse.org/package/show/science/python-ligo-lw?expand=0&rev=3
18 lines
776 B
Diff
18 lines
776 B
Diff
Index: python-ligo-lw-1.7.0/ligo/lw/utils/segments.py
|
|
===================================================================
|
|
--- python-ligo-lw-1.7.0.orig/ligo/lw/utils/segments.py
|
|
+++ python-ligo-lw-1.7.0/ligo/lw/utils/segments.py
|
|
@@ -397,8 +397,10 @@ class LigolwSegments(set):
|
|
</Table>
|
|
</LIGO_LW>
|
|
>>> xmlsegments = LigolwSegments(xmldoc)
|
|
- >>> xmlsegments.get_by_name("test")
|
|
- {'H1': [segment(LIGOTimeGPS(0, 0), LIGOTimeGPS(10, 0))], 'L1': [segment(LIGOTimeGPS(5, 0), LIGOTimeGPS(15, 0))]}
|
|
+ >>> xmlsegments.get_by_name("test")['H1']
|
|
+ [segment(LIGOTimeGPS(0, 0), LIGOTimeGPS(10, 0))]
|
|
+ >>> xmlsegments.get_by_name("test")['L1']
|
|
+ [segment(LIGOTimeGPS(5, 0), LIGOTimeGPS(15, 0))]
|
|
>>> xmlsegments.get_by_name("wrong name")
|
|
Traceback (most recent call last):
|
|
...
|