Commit 83c7124d authored by Moritz Huetten's avatar Moritz Huetten
Browse files

tests working with ctapipe 0.8.0

parent 7e4e0e0c
Pipeline #79481 passed with stage
in 10 minutes and 35 seconds
...@@ -48,7 +48,7 @@ def test_that_event_is_not_modified_after_loop(): ...@@ -48,7 +48,7 @@ def test_that_event_is_not_modified_after_loop():
# Unfortunately this does not work: # Unfortunately this does not work:
# assert last_event == event # assert last_event == event
# So for the moment we just compare event ids # So for the moment we just compare event ids
assert event.r0.event_id == last_event.r0.event_id assert event.index.event_id == last_event.index.event_id
def test_len(): def test_len():
...@@ -87,11 +87,11 @@ def test_eventseeker(): ...@@ -87,11 +87,11 @@ def test_eventseeker():
seeker = EventSeeker(source) seeker = EventSeeker(source)
event = seeker[0] event = seeker[0]
assert event.count == 0 assert event.count == 0
assert event.dl0.event_id == 29795 assert event.index.event_id == 29795
event = seeker[2] event = seeker[2]
assert event.count == 2 assert event.count == 2
assert event.r1.event_id == 29798 assert event.index.event_id == 29798
def test_eventcontent(): def test_eventcontent():
dataset = get_dataset_path("20131004_M1_05029747.003_Y_MagicCrab-W0.40+035.root") dataset = get_dataset_path("20131004_M1_05029747.003_Y_MagicCrab-W0.40+035.root")
...@@ -102,5 +102,5 @@ def test_eventcontent(): ...@@ -102,5 +102,5 @@ def test_eventcontent():
event = seeker[0] event = seeker[0]
assert event.dl1.tel[1].image[0] == -0.53125 assert event.dl1.tel[1].image[0] == -0.53125
assert event.dl1.tel[2].image[0] == 2.2265625 assert event.dl1.tel[2].image[0] == 2.2265625
assert event.dl1.tel[1].pulse_time[0] == 49.125 assert event.dl1.tel[1].peak_time[0] == 49.125
assert event.dl1.tel[2].pulse_time[0] == 23.5625 assert event.dl1.tel[2].peak_time[0] == 23.5625
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment