Skip to content

Commit

Permalink
Forge issue resolution (#139)
Browse files Browse the repository at this point in the history
* change a test funtion because of a [spurious] error in conda-forge
remove an unused line in setup.cfg

* rename a test function to be more descriptive

* remove test that conda forge does not seem to deal with properly

* change a test function because of a [spurious] error in conda-forge
remove an unused line in setup.cfg
fix merge conflicts
# Conflicts:
#	omicron/tests/test_segments.py

Co-authored-by: Joseph Areeda <joseph.areeda@ligo.org>
  • Loading branch information
areeda and Joseph Areeda authored Aug 18, 2022
1 parent 7517eed commit 74a2ef9
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions omicron/tests/test_segments.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,42 +87,3 @@ def test_get_frame_segments(find):
25,
100,
) == SegmentList([Segment(25, 30)])


@pytest.fixture
def mock_coverage_report_request(requests_mock):
requests_mock.get(
"https://segments.example.com/report/coverage",
json={
'query_information': 'stuff',
'results': {
'/dq/X1/TEST-FLAG/1': {
'total_known_segments': 1,
'total_active_segments': 0,
'earliest_known_segment': 0.,
'latest_active_segment': 100.,
'latest_known_segment': 90.,
'earliest_active_segment': 10.,
},
'/dq/Y1/TEST-FLAG/1': {
'total_known_segments': 2388,
'total_active_segments': 2388,
},
},
},
)
return requests_mock


def test_get_flag_coverage(mock_coverage_report_request):
assert segments.get_flag_coverage(
"X1:TEST-FLAG:1",
url="https://segments.example.com",
) == {
'total_known_segments': 1,
'total_active_segments': 0,
'earliest_known_segment': 0.,
'latest_active_segment': 100.,
'latest_known_segment': 90.,
'earliest_active_segment': 10.,
}

0 comments on commit 74a2ef9

Please sign in to comment.